diff options
author | Craig Topper <craig.topper@intel.com> | 2020-08-07 22:51:49 -0700 |
---|---|---|
committer | Craig Topper <craig.topper@intel.com> | 2020-08-07 22:51:49 -0700 |
commit | 514b00c43996221b90ce581bfb18b6af7caed5f6 (patch) | |
tree | 97a2b95f037370f902ac94a869ab4c83a9884da9 /llvm/unittests/Support/FileCheckTest.cpp | |
parent | 872bdc0be7dd38a3c41965cdeca876e03ac3fd6c (diff) | |
download | llvm-514b00c43996221b90ce581bfb18b6af7caed5f6.zip llvm-514b00c43996221b90ce581bfb18b6af7caed5f6.tar.gz llvm-514b00c43996221b90ce581bfb18b6af7caed5f6.tar.bz2 |
[X86] Limit the scope of the min/max canonicalization in combineSelect
Previously the transform was doing these two canonicalizations
(x > y) ? x : y -> (x >= y) ? x : y
(x < y) ? x : y -> (x <= y) ? x : y
But those don't seem to be useful generally. And they actively
pessimize the cases in PR47049.
This patch limits it to
(x > 0) ? x : 0 -> (x >= 0) ? x : 0
(x < -1) ? x : -1 -> (x <= -1) ? x : -1
These are the cases mentioned in the comments as the motivation
for the canonicalization. These allow the CMOV to use the S
flag from the compare thus improving opportunities to use a TEST
or the flags from an arithmetic instruction.
Diffstat (limited to 'llvm/unittests/Support/FileCheckTest.cpp')
0 files changed, 0 insertions, 0 deletions