[PATCH] D96098: [X86] Don't 1 to FP_ROUND in LowerFCOPYSIGN.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 4 19:29:38 PST 2021
craig.topper created this revision.
craig.topper added reviewers: spatel, RKSimon, pengfei.
Herald added a subscriber: hiraditya.
craig.topper requested review of this revision.
Herald added a project: LLVM.
I don't think we have any reason to believe the FP_ROUND here doesn't change the value.
Found while trying to see if we still need the fp128 block in CanCombineFCOPYSIGN_EXTEND_ROUND.
Removing that check caused this FP_ROUND to fire for fp128 which introduced a libcall expansion that asserted for this being a 1.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D96098
Files:
llvm/lib/Target/X86/X86ISelLowering.cpp
Index: llvm/lib/Target/X86/X86ISelLowering.cpp
===================================================================
--- llvm/lib/Target/X86/X86ISelLowering.cpp
+++ llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -21900,7 +21900,8 @@
// And if it is bigger, shrink it first.
if (Sign.getSimpleValueType().bitsGT(VT))
- Sign = DAG.getNode(ISD::FP_ROUND, dl, VT, Sign, DAG.getIntPtrConstant(1, dl));
+ Sign = DAG.getNode(ISD::FP_ROUND, dl, VT, Sign,
+ DAG.getIntPtrConstant(0, dl));
// At this point the operands and the result should have the same
// type, and that won't be f80 since that is not custom lowered.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96098.321633.patch
Type: text/x-patch
Size: 649 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210205/a4656c84/attachment.bin>
More information about the llvm-commits
mailing list