[PATCH] D16810: [mips] Make isel select the correct DEXT variant up front.

Daniel Sanders via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 29 04:01:36 PST 2016


dsanders added inline comments.

================
Comment at: lib/Target/Mips/MipsInstrInfo.td:808-816
@@ -800,1 +807,11 @@
 
+def immZExt5Plus1 : PatLeaf<(imm), [{
+  return isUInt<5>(N->getZExtValue() - 1);
+}]>;
+def immZExt5Plus32 : PatLeaf<(imm), [{
+  return isUInt<5>(N->getZExtValue() - 32);
+}]>;
+def immZExt5Plus33 : PatLeaf<(imm), [{
+  return isUInt<5>(N->getZExtValue() - 33);
+}]>;
+
----------------
vkalintiris wrote:
> The names imply that we add a constant to the zext'd value, but we perform a subtraction instead.
The intent is to describe the ranges 1..32, 32..63, and 33..64 which are uimm5's with an offset added. The reason the code performs a subtraction is that the predicate must undo the offset so that we can test for a normal uimm5.


http://reviews.llvm.org/D16810





More information about the llvm-commits mailing list