[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:26:38 PDT 2017


hfinkel added inline comments.


================
Comment at: lib/Target/PowerPC/PPCISelDAGToDAG.cpp:1076
+      // If the upper 32 bits are known to be all zero, we can go through
+      // this zero-entend node.
+      unsigned i = 0;
----------------
entend -> extend


================
Comment at: lib/Target/PowerPC/PPCISelDAGToDAG.cpp:1079
+      for (i = 32; i < NumBits; ++i)
+        if (!(*LHSBits)[i].isZero()) break;
+      if (i != NumBits)
----------------
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).


https://reviews.llvm.org/D37514





More information about the llvm-commits mailing list