[PATCH] D35801: [PowerPC] enable optimizeCompareInstr for branch with static branch hint

Hiroshi Inoue via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 24 08:43:46 PDT 2017


inouehrs created this revision.

In `optimizeCompareInstr`, a compare instruction is eliminated by using a record form instruction if possible.
If the branch instruction that uses the result of the compare has a static branch hint, the optimization does not happen.
This patch makes this optimization happen regardless of the branch hint by splitting branch hint and branch condition before checking the predicate to identify the possible optimizations.


https://reviews.llvm.org/D35801

Files:
  lib/Target/PowerPC/MCTargetDesc/PPCPredicates.h
  lib/Target/PowerPC/PPCInstrInfo.cpp
  test/CodeGen/PowerPC/opt-cmp-inst-cr0-live.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35801.107906.patch
Type: text/x-patch
Size: 4609 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170724/7efa446d/attachment.bin>


More information about the llvm-commits mailing list