[all-commits] [llvm/llvm-project] 44fd45: [SimplifyCFG] Extract helper for creating logical ...

Nikita Popov via All-commits all-commits at lists.llvm.org
Tue May 4 10:52:02 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 44fd4575b39a14f98f6c3ace91795bd75e14732c
      https://github.com/llvm/llvm-project/commit/44fd4575b39a14f98f6c3ace91795bd75e14732c
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2021-05-04 (Tue, 04 May 2021)

  Changed paths:
    M llvm/lib/Transforms/Utils/SimplifyCFG.cpp

  Log Message:
  -----------
  [SimplifyCFG] Extract helper for creating logical op (NFC)


  Commit: 54db12ff5a5ed33662c75bc465c5a44ac234c6f2
      https://github.com/llvm/llvm-project/commit/54db12ff5a5ed33662c75bc465c5a44ac234c6f2
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2021-05-04 (Tue, 04 May 2021)

  Changed paths:
    M llvm/test/Transforms/SimplifyCFG/preserve-branchweights.ll

  Log Message:
  -----------
  [SimplifyCFG] Regenerate test checks (NFC)

Regenerate the branch weight test using --check-globals.


  Commit: e20897726f080d6378668f8b4b656bbb34313578
      https://github.com/llvm/llvm-project/commit/e20897726f080d6378668f8b4b656bbb34313578
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2021-05-04 (Tue, 04 May 2021)

  Changed paths:
    M llvm/lib/Transforms/Utils/SimplifyCFG.cpp
    M llvm/test/Transforms/SimplifyCFG/SimplifyEqualityComparisonWithOnlyPredecessor-domtree-preservation-edgecase.ll
    M llvm/test/Transforms/SimplifyCFG/branch-fold.ll
    M llvm/test/Transforms/SimplifyCFG/extract-cost.ll
    M llvm/test/Transforms/SimplifyCFG/hoist-dbgvalue.ll
    M llvm/test/Transforms/SimplifyCFG/preserve-branchweights.ll
    M llvm/test/Transforms/SimplifyCFG/wc-widen-block.ll

  Log Message:
  -----------
  [SimplifyCFG] Create logical or in SimplifyCondBranchToCondBranch()

We need to use a logical or instead of a bitwise or to preserve
poison behavior. Poison from the second condition should not
propagate if the first condition is true.

We were already handling this correctly in FoldBranchToCommonDest(),
but not in this fold. (There are still other folds with this issue.)


Compare: https://github.com/llvm/llvm-project/compare/632ee3851349...e20897726f08


More information about the All-commits mailing list