[llvm] [DAGCombiner] Ensure poison-generating flags are stripped in `freeze` op (PR #114582)
Antonio Frighetto via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 2 02:36:20 PDT 2024
================
@@ -16151,6 +16151,7 @@ SDValue DAGCombiner::visitFREEZE(SDNode *N) {
SVN->getMask());
} else {
// NOTE: this strips poison generating flags.
+ N0->dropFlags(SDNodeFlags::PoisonGeneratingFlags);
----------------
antoniofrighetto wrote:
Quite strange. I just tried again and confirm the node returned here:
https://github.com/llvm/llvm-project/blob/89a8c71db61282c4e7522ffda5dbee890900dca5/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp#L10321-L10322
is `i32 = select_cc t12, t28, t16, t2, setult:ch`, immediately after visiting freeze in DAGCombiner. I'm happy with your patch too.
https://github.com/llvm/llvm-project/pull/114582
More information about the llvm-commits
mailing list