[PATCH] D63318: [DAGCombine] Teach DAGCombine to fold the aext + select pattern

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 20 06:01:28 PDT 2019


spatel added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:8846-8847
+        (Opcode != ISD::ZERO_EXTEND || !TLI.isZExtFree(N0.getValueType(), VT))) {
+      // Sign extend the operands if it is any_extend, to keep the signess
+      // of the operands that, the other combine rule would apply. i.e.
+      //
----------------
This sentence is not clear to me. Is this better?
"For any_extend, choose sign extension of the constants to allow a possible further transform to sign_extend_inreg."

I'm not sure if using sign extension is the best choice in all cases, but if there are no visible test regressions, I guess that's ok for now.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63318/new/

https://reviews.llvm.org/D63318





More information about the llvm-commits mailing list