Skip to content

Commit

Permalink
[PowerPC] Require FPCVT for store fptoi combination
Browse files Browse the repository at this point in the history
  • Loading branch information
ecnelises committed Jun 5, 2023
1 parent eecaeb6 commit 590c6a1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions llvm/lib/Target/PowerPC/PPCISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15515,10 +15515,9 @@ SDValue PPCTargetLowering::PerformDAGCombine(SDNode *N,

EVT Op1VT = N->getOperand(1).getValueType();
unsigned Opcode = N->getOperand(1).getOpcode();
bool NeedsFPCVT = Opcode == ISD::FP_TO_UINT && Op1VT == MVT::i64;

if ((Opcode == ISD::FP_TO_SINT || Opcode == ISD::FP_TO_UINT) &&
(!NeedsFPCVT || Subtarget.hasFPCVT())) {
Subtarget.hasFPCVT()) {
SDValue Val= combineStoreFPToInt(N, DCI);
if (Val)
return Val;
Expand Down

0 comments on commit 590c6a1

Please sign in to comment.