[llvm] [DAGCombiner] Ensure poison-generating flags are stripped in `freeze` op (PR #114582)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 2 02:20:08 PDT 2024


================
@@ -16151,6 +16151,7 @@ SDValue DAGCombiner::visitFREEZE(SDNode *N) {
                              SVN->getMask());
   } else {
     // NOTE: this strips poison generating flags.
+    N0->dropFlags(SDNodeFlags::PoisonGeneratingFlags);
----------------
dtcxzyw wrote:

> but the flag has been dropped by the time it gets CSE'd.

I printed the node returned by `FindNodeOrInsertPos` and got `select_cc samesign`. The flags are not dropped. It should be fixed by https://github.com/llvm/llvm-project/pull/114650.


https://github.com/llvm/llvm-project/pull/114582


More information about the llvm-commits mailing list