[PATCH] D21949: [SystemZ] Utilize Test Data Class instructions.

Ulrich Weigand via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 8 08:53:33 PDT 2016


uweigand added inline comments.

================
Comment at: lib/Target/SystemZ/SystemZTDC.cpp:141
@@ +140,3 @@
+    // Likewise for infinities.
+    WhichConst = Const->isNegative() ? 2 : 1;
+  } else if (Const->isExactlyValue(Smallest)) {
----------------
koriakin wrote:
> uweigand wrote:
> > Do we need to check for impossible comparisons here (like x > inf)?
> Not really - at worst we'll get an all-0 or all-1 TDC mask here, so there's no correctness problem.  And such comparisons should be removed by earlier optimization passes, so there's no performance problem here either.
OK, makes sense.

================
Comment at: lib/Target/SystemZ/SystemZTDC.cpp:165
@@ +164,3 @@
+    0,     0xee0, 0x110, 0x00f, // -minnorm
+  };
+  // Construct the mask as a combination of the partial masks.
----------------
koriakin wrote:
> uweigand wrote:
> > These mask constants are a bit hard to read.  It would be nicer to define symbolic constants for the various TDC mask bits ...
> OK, will do.
Thanks!


Repository:
  rL LLVM

http://reviews.llvm.org/D21949





More information about the llvm-commits mailing list