OSDN Git Service

[PowerPC] Use record-form instruction for Less-or-Equal -1 and Greater-or-Equal 1
authorHiroshi Inoue <inouehrs@jp.ibm.com>
Thu, 26 Oct 2017 09:01:51 +0000 (09:01 +0000)
committerHiroshi Inoue <inouehrs@jp.ibm.com>
Thu, 26 Oct 2017 09:01:51 +0000 (09:01 +0000)
commite703b246767c422aef5c917a1bbd77bddcfefc4a
tree25f820f4b1cc62eaf689a568d07b20de2bf0121b
parentddfb984471803325e47e182966abb05d634cf30a
[PowerPC] Use record-form instruction for Less-or-Equal -1 and Greater-or-Equal 1

Currently a record-form instruction is used for comparison of "greater than -1" and "less than 1" by modifying the predicate (e.g. LT 1 into LE 0) in addition to the naive case of comparison against 0.
This patch also enables emitting a record-form instruction for "less than or equal to -1" (i.e. "less than 0") and "greater than or equal to 1" (i.e. "greater than 0") to increase the optimization opportunities.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316647 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPCInstrInfo.cpp
test/CodeGen/PowerPC/opt-cmp-inst-cr0-live.ll