[PATCH] D23893: [DAGCombine] Don't fold a trunc if it feeds an anyext

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 26 02:28:13 PDT 2016


RKSimon added a comment.

Are the mem-intrin-base-reg.ll changes relevant?


================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:7139
@@ +7138,3 @@
+  // If this is anyext(trunc), don't fold it, allow ourselves to be folded.
+  if (N->hasOneUse() && (N->use_begin()->getOpcode() == ISD::ANY_EXTEND))
+    return SDValue();
----------------
Should we limit this to AfterLegalizeTypes or later?


https://reviews.llvm.org/D23893





More information about the llvm-commits mailing list