[all-commits] [llvm/llvm-project] 18c70a: [JumpThreading] Simplify getPredicateAt() based fo...

Nikita Popov via All-commits all-commits at lists.llvm.org
Wed May 18 02:25:13 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 18c70a7bd932d1259cd28b82f946bec5dc77bfc2
      https://github.com/llvm/llvm-project/commit/18c70a7bd932d1259cd28b82f946bec5dc77bfc2
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-05-18 (Wed, 18 May 2022)

  Changed paths:
    M llvm/lib/Transforms/Scalar/JumpThreading.cpp

  Log Message:
  -----------
  [JumpThreading] Simplify getPredicateAt() based folding

It's sufficient to just fold the icmp to true/false here, and then
let constant terminator folding take care of the rest.

It should be noted that while replaceFoldableUses() may not replace
all uses of the icmp, at least the use in the terminator we're
working on is always replaceable, so terminator constant folding
should be reliably enabled as a subsequent step.




More information about the All-commits mailing list