You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(If you run a full -O2 or -O3 then CVP will get rid of the and, but that's not run in -O1. And InstCombine has the information it needs to do it correctly anyway, AFAICT, so it just should.)
The text was updated successfully, but these errors were encountered:
Rust in which we spotted this originally: https://rust.godbolt.org/z/Knr5jdEY5, cc rust-lang/rust#139098 (comment)
Take this input IR:
Today https://llvm.godbolt.org/z/vnfGGxfbr,
--passes=instcombine
transforms that toHowever it should not be adding that
and i8 %0, 1
-- thetrunc nuw
means it ought to know it doesn't need to do that.It should instead be emitting https://alive2.llvm.org/ce/z/oN3dig
Note that the correctness for this doesn't depend on the range information; removing that from the parameter it still validates https://alive2.llvm.org/ce/z/_ed2Ch.
(If you run a full -O2 or -O3 then CVP will get rid of the
and
, but that's not run in -O1. And InstCombine has the information it needs to do it correctly anyway, AFAICT, so it just should.)The text was updated successfully, but these errors were encountered: