[all-commits] [llvm/llvm-project] d085b4: [InstSimplify] Do not simplify freeze in `simplify...

Yingwei Zheng via All-commits all-commits at lists.llvm.org
Tue May 7 19:04:31 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d085b42cbbefe79a41113abcd2b1e1f2a203acef
      https://github.com/llvm/llvm-project/commit/d085b42cbbefe79a41113abcd2b1e1f2a203acef
  Author: Yingwei Zheng <dtcxzyw2333 at gmail.com>
  Date:   2024-05-08 (Wed, 08 May 2024)

  Changed paths:
    M llvm/lib/Analysis/InstructionSimplify.cpp
    M llvm/test/Transforms/InstCombine/icmp.ll
    M llvm/test/Transforms/InstCombine/select.ll
    M llvm/test/Transforms/PGOProfile/chr.ll

  Log Message:
  -----------
  [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



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list