Skip to content

Conversation

@pedroclobo
Copy link
Member

Call insertelement on a poison value instead of undef.

Call `insertelement` on a `poison` value instead of `undef`.
@llvmbot
Copy link
Member

llvmbot commented Apr 6, 2025

@llvm/pr-subscribers-backend-powerpc

Author: Pedro Lobo (pedroclobo)

Changes

Call insertelement on a poison value instead of undef.


Full diff: https://github.com/llvm/llvm-project/pull/134552.diff

1 Files Affected:

  • (modified) llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp (+1-1)
diff --git a/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp b/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
index 2a5af3e50af26..3a4c2fcad8c83 100644
--- a/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
+++ b/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
@@ -126,7 +126,7 @@ PPCTTIImpl::instCombineIntrinsic(InstCombiner &IC, IntrinsicInst &II) const {
             IC.Builder.CreateBitCast(II.getArgOperand(0), Mask->getType());
         Value *Op1 =
             IC.Builder.CreateBitCast(II.getArgOperand(1), Mask->getType());
-        Value *Result = UndefValue::get(Op0->getType());
+        Value *Result = PoisonValue::get(Op0->getType());
 
         // Only extract each element once.
         Value *ExtractedElts[32];

@pedroclobo pedroclobo requested a review from nunoplopes April 7, 2025 20:31
@pedroclobo pedroclobo merged commit 6a94bd1 into llvm:main Apr 7, 2025
13 checks passed
@pedroclobo pedroclobo deleted the ppc-poison branch April 7, 2025 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants