Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PPC] Change placeholder from undef to poison #134552

Merged
merged 1 commit into from
Apr 7, 2025

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