[all-commits] [llvm/llvm-project] d1d7fc: [X86] Canonicalize (x > 1) ? x : 1 -> (x >= 1) ? x...
topperc via All-commits
all-commits at lists.llvm.org
Wed Sep 30 13:52:26 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: d1d7fc98325d948bede85e6304c5ca93f79e050e
https://github.com/llvm/llvm-project/commit/d1d7fc98325d948bede85e6304c5ca93f79e050e
Author: Craig Topper <craig.topper at intel.com>
Date: 2020-09-30 (Wed, 30 Sep 2020)
Changed paths:
M llvm/lib/Target/X86/X86ISelLowering.cpp
M llvm/test/CodeGen/X86/cmov.ll
Log Message:
-----------
[X86] Canonicalize (x > 1) ? x : 1 -> (x >= 1) ? x : 1 for sign and unsigned to enable the use of test instructions for the compare.
This will be further canonicalized to a compare involving 0
which will enable the use of test instructions. Either using
cmovg for signed for cmovne for unsigned.
Fixes more case for PR47049
More information about the All-commits
mailing list