If the condition value of SelectInst may be a poison or undef value,
infer constant range at SelectInst use is incorrect, similar to D143883.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
(For future reference, the freeze isn't necessary if the operand is poison; it's only necessary if the operand is undef.)
Comment Actions
hi, @efriedma, Thanks for your information.
do you mean we'd better check the attribute **noundef ** before adding the **freeze** ? such as https://alive2.llvm.org/ce/z/2pIqvX, this case isn't necessary to add freeze ?
Comment Actions
I don't think there's anything to do here at the moment. "noundef" refers to both undef and poison. (Later optimizations will remove the "freeze" if it isn't necessary.)