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

Yingwei Zheng via All-commits all-commits at lists.llvm.org
Tue May 14 16:33:33 PDT 2024


  Branch: refs/heads/release/18.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 494847ba8fef9a29cfa92aac3f8aaa1102b5d44f
      https://github.com/llvm/llvm-project/commit/494847ba8fef9a29cfa92aac3f8aaa1102b5d44f
  Author: Yingwei Zheng <dtcxzyw2333 at gmail.com>
  Date:   2024-05-14 (Tue, 14 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

(cherry picked from commit d085b42cbbefe79a41113abcd2b1e1f2a203acef)

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

This reverts commit 1c2eb18d52976fef89972e89c52d2ec5ed7e4868.

[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

(cherry picked from commit d085b42cbbefe79a41113abcd2b1e1f2a203acef)



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