[llvm] [DirectX] Legalize i8 allocas (PR #137399)
Farzon Lotfi via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 29 12:22:37 PDT 2025
================
@@ -81,16 +108,29 @@ static void fixI8TruncUseChain(Instruction &I,
Value *NewInst =
Builder.CreateBinOp(BO->getOpcode(), NewOperands[0], NewOperands[1]);
if (auto *OBO = dyn_cast<OverflowingBinaryOperator>(&I)) {
- if (OBO->hasNoSignedWrap())
- cast<BinaryOperator>(NewInst)->setHasNoSignedWrap();
- if (OBO->hasNoUnsignedWrap())
- cast<BinaryOperator>(NewInst)->setHasNoUnsignedWrap();
+ auto *NewBO = dyn_cast<BinaryOperator>(NewInst);
----------------
farzonl wrote:
We are see line 110. But since we can't cast to BinaryOperator we can't set `setHasNoSignedWrap` or `setHasNoUnsignedWrap` so the cast to OverflowingBinaryOperator is not used.
https://github.com/llvm/llvm-project/pull/137399
More information about the llvm-commits
mailing list