Skip to content

Commit 57eba6f

Browse files
committed
[AMDGPU] Fix missing IsExact flag when expanding vector binary operator
1 parent 5e6e40f commit 57eba6f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1594,6 +1594,11 @@ bool AMDGPUCodeGenPrepareImpl::visitBinaryOperator(BinaryOperator &I) {
15941594
}
15951595
}
15961596

1597+
if (auto *NewEltI = dyn_cast<Instruction>(NewElt))
1598+
if (PossiblyExactOperator::isPossiblyExactOpcode(
1599+
NewEltI->getOpcode()))
1600+
NewEltI->setIsExact(I.isExact());
1601+
15971602
NewDiv = Builder.CreateInsertElement(NewDiv, NewElt, N);
15981603
}
15991604
} else {

0 commit comments

Comments
 (0)