[all-commits] [llvm/llvm-project] 4ffe3a: Revert "[CodeGenPrepare] Freeze condition when tra...

Juneyoung Lee via All-commits all-commits at lists.llvm.org
Sun Mar 15 20:46:45 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 4ffe3ac729aa7a9863ea9a7bd451785a787d7ad8
      https://github.com/llvm/llvm-project/commit/4ffe3ac729aa7a9863ea9a7bd451785a787d7ad8
  Author: Juneyoung Lee <aqjune at gmail.com>
  Date:   2020-03-16 (Mon, 16 Mar 2020)

  Changed paths:
    M llvm/lib/CodeGen/CodeGenPrepare.cpp
    M llvm/test/CodeGen/ARM/2012-08-30-select.ll
    M llvm/test/Transforms/CodeGenPrepare/X86/optimizeSelect-DT.ll
    M llvm/test/Transforms/CodeGenPrepare/X86/select.ll

  Log Message:
  -----------
  Revert "[CodeGenPrepare] Freeze condition when transforming select to br"

This reverts commit 10aa7ea951e22dbd7f2ebdeb6410cfbc8a251eb1.


  Commit: 6ad63606ea4afde9043148509449ab984bfd499a
      https://github.com/llvm/llvm-project/commit/6ad63606ea4afde9043148509449ab984bfd499a
  Author: Juneyoung Lee <aqjune at gmail.com>
  Date:   2020-03-16 (Mon, 16 Mar 2020)

  Changed paths:
    M llvm/lib/CodeGen/CodeGenPrepare.cpp
    M llvm/test/CodeGen/ARM/2012-08-30-select.ll
    M llvm/test/Transforms/CodeGenPrepare/X86/optimizeSelect-DT.ll
    M llvm/test/Transforms/CodeGenPrepare/X86/select.ll

  Log Message:
  -----------
  [CodeGenPrepare] Freeze condition when transforming select to br

Summary:
This is a simple fix for CodeGenPrepare that freezes branch condition when transforming select to branch.
If it is not frozen, instsimplify or the later pipeline can potentially exploit undefined behavior.

The diff shows optimized form becase D75859 and D76048 already made a few changes to CodeGenPrepare for optimizing freeze(cmp).

Reviewers: jdoerfert, spatel, lebedev.ri, efriedma

Reviewed By: lebedev.ri

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D76179


Compare: https://github.com/llvm/llvm-project/compare/4c90a5297d11...6ad63606ea4a


More information about the All-commits mailing list