[PATCH] D37514: [PowerPC] support ZERO_EXTEND in tryBitPermutation

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 29 08:37:45 PDT 2017


hfinkel added inline comments.


================
Comment at: lib/Target/PowerPC/PPCISelDAGToDAG.cpp:1079
+      for (i = 32; i < NumBits; ++i)
+        if (!(*LHSBits)[i].isZero()) break;
+      if (i != NumBits)
----------------
hfinkel wrote:
> Why are you checking that the upper bits are zero? This is a zext node, so I'd think you should just force them all to zero (like the code for AND does for bits that are zero).
Or, to put it another way, if you do it this way, then you should have a comment that reads something like, "We'll look through zext nodes here, but only if they're provably redundant." If we do this, however, we should explain why.


https://reviews.llvm.org/D37514





More information about the llvm-commits mailing list