[llvm] [SelectionDAG] Handle more opcodes in canCreateUndefOrPoison (PR #84921)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 12 07:24:39 PDT 2024


================
@@ -15383,6 +15383,12 @@ SDValue DAGCombiner::visitFREEZE(SDNode *N) {
   if (DAG.isGuaranteedNotToBeUndefOrPoison(N0, /*PoisonOnly*/ false))
     return N0;
 
+  // There is a reverse transform in visitEXTRACT_VECTOR_ELT, so we need to
+  // avoid inifite looping by not pulling freeze through EXTRACT_VECTOR_ELT
----------------
nikic wrote:

```suggestion
  // avoid infinite looping by not pushing freeze through EXTRACT_VECTOR_ELT
```

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


More information about the llvm-commits mailing list