Skip to content

Commit c9ac0c7

Browse files
pedroclobofrederik-h
authored andcommitted
[AMDGPU] Change placeholder from undef to poison (llvm#130853)
Call `insertelement` with `poison` instead of `undef`.
1 parent 8f8b30a commit c9ac0c7

File tree

2 files changed

+37
-37
lines changed

2 files changed

+37
-37
lines changed

llvm/lib/Target/AMDGPU/AMDGPUImageIntrinsicOptimizer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ bool optimizeSection(ArrayRef<SmallVector<IntrinsicInst *, 4>> MergeableInsts) {
256256
VecOp = B.CreateExtractElement(NewCalls[0], Idx->getValue().urem(4));
257257
LLVM_DEBUG(dbgs() << "Add: " << *VecOp << "\n");
258258
} else {
259-
VecOp = UndefValue::get(II->getType());
259+
VecOp = PoisonValue::get(II->getType());
260260
for (unsigned I = 0; I < NumElts; ++I) {
261261
VecOp = B.CreateInsertElement(
262262
VecOp,

0 commit comments

Comments
 (0)