Rosh Hashanah 16a quotes the following teaching:
א"ר יהודה משום ר"ע ... מפני מה אמרה תורה הביאו שתי הלחם בעצרת מפני שעצרת זמן פירות האילן הוא אמר הקב"ה הביאו לפני שתי הלחם בעצרת כדי שיתברכו לכם פירות האילן
R’ Yehudah said in the name of R’ Akiva, “...Why did the Torah say to bring two loaves on Shavuos? Because Shavuos is the time of the fruit of the tree. Hashem said: ‘Bring before Me two loaves on Shavuos so that the fruit of the tree will be blessed for you.’”
Rashi (DH Shtei HaLechem) explains the connection between the loaves and the judging of fruit:
שתי הלחם - ירצו על פירות האילן שהן מתירין להביא בכורים שאין מביאין בכורים קודם לעצרת דכתיב (שמות ל״ד:כ״ב) בכורי קציר חטים ואני שמעתי דרבי יהודה לטעמיה דהא אזלא כמאן דאמר בסנהדרין (דף ע:) עץ שאכל אדם הראשון חטה היתה:
They make the fruit of the tree accepted because they permit the bringing of Bikkurim, as we do not bring Bikkurim before Shavuos, as it is written, “The first of the wheat harvest.” I heard that R’ Yehudah is going according to his own reasoning, for this goes according to the one who says in Sanhedrin (70b) that the tree from which Adam ate was a wheat stalk.
That’s all well and good according to R’ Yehudah, but what about those who argue on him regarding the Tree of Knowledge that it wasn’t a wheat stalk? To quote the full discussion in Sanhedrin 70a-b:
ר"מ אומר אותו אילן שאכל אדם הראשון ממנו גפן היה שאין לך דבר שמביא יללה לאדם אלא יין ר' יהודה אומר חטה היה שאין התינוק יודע לקרוא אבא ואימא עד שיטעום טעם דגן רבי נחמיה אומר תאנה היה שבדבר שקלקלו בו נתקנו שנאמר (בראשית ג, ז) ויתפרו עלה תאנה
R’ Meir says, “The tree from which Adam ate was a grape vine, for there’s nothing which brings wailing upon a person except wine.” R’ Yehudah says, “It was a wheat stalk, for a child doesn’t know how to call his parents until he’s tasted grain.” R’ Nechemiah says, “It was a fig tree, for with that with which they sinned they fixed, as it says, ‘They sewed fig leaves.’”
If you want to say that in principle R’ Meir and R’ Nechemiah hold that a wheat stalk is considered a tree, but for their rationales cited above they hold that Adam ate from a different tree, then why does Berachos 40a emphasize that it’s specifically R’ Yehudah’s opinion that wheat is a tree:
על פירות הארץ וכו׳: פשיטא אמר רב נחמן בר יצחק לא נצרכה אלא לרבי יהודה דאמר חטה מין אילן היא
”On the fruit of the land, [if one said ‘Who created the fruit of the tree,’ he didn’t fulfill his obligation].” This is obvious! Rav Nachman bar Yitzchak said, “It’s only needed for R’ Yehudah, who says that wheat is a type of tree...”
The Gemara then quotes the above Braisa regarding the Tree of Knowledge. Its wording sounds to me as to imply that it’s specifically R’ Yehudah who holds that wheat is a tree.
If the other Tannaim don’t hold that wheat is considered fruit, how do they explain why we bring the Shtei HaLechem on Shavuos?