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

Vasileios Kalintiris via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 29 04:53:51 PST 2016


vkalintiris 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);
+}]>;
+
----------------
dsanders wrote:
> 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.
Ok, I was trying to think of a better name such as immZExt5Offset32, but I don't like that either. You can go ahead and commit this then.


http://reviews.llvm.org/D16810





More information about the llvm-commits mailing list