[PATCH] D151472: [SelectionDAG][AArch64][ARM] Remove setFlags call from DAGTypeLegalizer::SetPromotedInteger.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 25 10:22:42 PDT 2023
craig.topper created this revision.
craig.topper added reviewers: 0xdc03, nikic, RKSimon, efriedma, mcberg2021.
Herald added subscribers: StephenFan, dmgreen, hiraditya, kristof.beyls.
Herald added a project: All.
craig.topper requested review of this revision.
Herald added a project: LLVM.
This was originally added to preserve FMF on SETCC. Unfortunately,
it also incorrectly preserves nuw/nsw on ADD/SUB in some cases.
There's also no guarantee the new opcode is even the same opcode
as the original node.
This patch removes the code and adds code to explicitly preserve
FMF flags in the SETCC promotion function.
The other test changes are from nuw/nsw not being preserved. I
believe for all these tests it was correct to preserve the flags,
so we need new code to preserve the flags when possible. I'll post
another patch for that since it's a riskier change.
This should unblock D150769 <https://reviews.llvm.org/D150769>.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D151472
Files:
llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
llvm/test/CodeGen/AArch64/arm64-vhadd.ll
llvm/test/CodeGen/AArch64/sve-hadd.ll
llvm/test/CodeGen/Thumb2/mve-vhadd.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151472.525694.patch
Type: text/x-patch
Size: 12223 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230525/e386b232/attachment.bin>
More information about the llvm-commits
mailing list