This patch stops unconditionally transforming FSUB(-0, X) into an FNEG(X) while building the MIR.
This corresponds with the old ISel change in D84056.
Paths
| Differential D85139
[GlobalISel] Don't transform FSUB(-0, X) -> FNEG(X) in GlobalISel. ClosedPublic Authored by cameron.mcinally on Aug 3 2020, 8:52 AM.
Details Summary This patch stops unconditionally transforming FSUB(-0, X) into an FNEG(X) while building the MIR. This corresponds with the old ISel change in D84056.
Diff Detail
Event Timelinecameron.mcinally retitled this revision from [GlobalISel] Don't transform FSUB(-0, X) -> FNEG(X) in SelectionDAGBuilder. to [GlobalISel] Don't transform FSUB(-0, X) -> FNEG(X) in GlobalISel..Aug 3 2020, 8:52 AM This revision is now accepted and ready to land.Aug 4 2020, 5:28 AM Comment Actions
You're probably right. Just took a look and I don't see anything obvious though. Did you have a particular set of tests in mind? I do see some tests that transform an illegal G_FNEG into an G_FSUB. I don't fully understand the motivation yet, but that's probably worth attention. Comment Actions
No, I mean you changed these cases using fsub in the irtranslator test, when there were already tests for fneg here already. LegalizerHelper still does have an incorrect expansion of fneg into fsub, but that's another story Closed by commit rG23adbac9ee23: [GlobalISel] Don't transform FSUB(-0, X) -> FNEG(X) in GlobalISel. (authored by cameron.mcinally). · Explain WhyAug 4 2020, 9:27 AM This revision was automatically updated to reflect the committed changes. Comment Actions Ah, ok. Tests removed with: commit 724b035fe4df89e807f85ee202da8b0bc227895b (HEAD -> master, origin/master, origin/HEAD) [GlobalISel] Remove redundant FNEG tests. These tests were made redundant by D85139.
Revision Contents
Diff 282945 llvm/include/llvm/CodeGen/GlobalISel/IRTranslator.h
llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
llvm/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll
|