Unverified Commit d085b42c authored by Yingwei Zheng's avatar Yingwei Zheng Committed by GitHub
Browse files

[InstSimplify] Do not simplify freeze in `simplifyWithOpReplaced` (#91215)

See the LangRef:
> All uses of a value returned by the same ‘freeze’ instruction are
guaranteed to always observe the same value, while different ‘freeze’
instructions may yield different values.

It is incorrect to replace freezes with the simplified value.

Proof:
https://alive2.llvm.org/ce/z/3Dn9Cd
https://alive2.llvm.org/ce/z/Qyh5h6

Fixes https://github.com/llvm/llvm-project/issues/91178
parent 7098cd21
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment