[llvm] [IR] Add nowrap flags for trunc instruction (PR #85592)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 30 13:21:41 PDT 2024
================
@@ -27,6 +27,10 @@ bool Operator::hasPoisonGeneratingFlags() const {
auto *OBO = cast<OverflowingBinaryOperator>(this);
return OBO->hasNoUnsignedWrap() || OBO->hasNoSignedWrap();
}
+ case Instruction::Trunc: {
+ auto *TI = dyn_cast<TruncInst>(this);
+ return TI->hasNoUnsignedWrap() || TI->hasNoSignedWrap();
----------------
elhewaty wrote:
@antoniofrighetto, I need a test case that crashes. yours and mine do not.
But the full test from nathanchance does!
https://github.com/llvm/llvm-project/pull/85592
More information about the llvm-commits
mailing list