[PATCH] D104793: [ARM] Transform a floating-point to fixed-point conversion to a VCVT_fix

Sam Tebbs via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 29 06:05:40 PDT 2021


samtebbs marked 3 inline comments as done.
samtebbs added inline comments.


================
Comment at: llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:3180
+    return false;
+  if (ImmNode.getOpcode() == ISD::BITCAST)
+    ImmNode = ImmNode.getOperand(0);
----------------
dmgreen wrote:
> Should this still check for the same size of the bitcast on ImmNode?
It should :)


================
Comment at: llvm/test/CodeGen/Thumb2/mve-vcvt-float-to-fixed.ll:311
+; CHECK-NEXT:    bx lr
+  %2 = fmul fast <4 x float> %0, <float 0xC1E0000000000000, float 0xC1E0000000000000, float 0xC1E0000000000000, float 0xC1E0000000000000>
+  %3 = fptosi <4 x float> %2 to <4 x i32>
----------------
dmgreen wrote:
> Should this be 0x41E0000000000000 ?
Yes, you're right. I'd copied the same values from the fixed_to_float tests without remembering they were 1/2^n rather than 2^n.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104793/new/

https://reviews.llvm.org/D104793



More information about the llvm-commits mailing list