[PATCH] D77895: [x86] use vector instructions to lower FP->int->FP casts

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 11 05:51:28 PDT 2020


spatel marked 2 inline comments as done.
spatel added inline comments.


================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:19158
+  SDValue X = CastToInt.getOperand(0);
+  // TODO: Allow size-changing from source to dest (double -> i32 -> float)
+  if (X.getSimpleValueType() != VT ||
----------------
RKSimon wrote:
> What's stopping us getting this done in this patch as well?
useVectorCast() needs to be updated (or we just account for instruction availability directly here). 

Not a big deal, but I figured it was better to go piecemeal with the legacy of broken software from the related fptrunc patches. :)

I'll add more tests and make the enhancements soon.


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

https://reviews.llvm.org/D77895





More information about the llvm-commits mailing list