diff options
author | Chris Lattner <sabre@nondot.org> | 2010-12-19 22:08:31 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-12-19 22:08:31 +0000 |
commit | c19d1c3ba2b216f0f91d71cf6fc2e983fc995854 (patch) | |
tree | bac5a92aeaf2d30963e52aa20486d19a0fef1b06 /lib/Target/X86/X86InstrCompiler.td | |
parent | 22d67cf6ac84c06867681a2fe72f78d5d2b9444d (diff) | |
download | external_llvm-c19d1c3ba2b216f0f91d71cf6fc2e983fc995854.zip external_llvm-c19d1c3ba2b216f0f91d71cf6fc2e983fc995854.tar.gz external_llvm-c19d1c3ba2b216f0f91d71cf6fc2e983fc995854.tar.bz2 |
improve the setcc -> setcc_carry optimization to happen more
consistently by moving it out of lowering into dag combine.
Add some missing patterns for matching away extended versions of setcc_c.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122201 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86InstrCompiler.td')
-rw-r--r-- | lib/Target/X86/X86InstrCompiler.td | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/Target/X86/X86InstrCompiler.td b/lib/Target/X86/X86InstrCompiler.td index 2b1ea9c..724e6b8 100644 --- a/lib/Target/X86/X86InstrCompiler.td +++ b/lib/Target/X86/X86InstrCompiler.td @@ -193,9 +193,20 @@ def SETB_C64r : RI<0x19, MRMInitReg, (outs GR64:$dst), (ins), "", } // isCodeGenOnly +def : Pat<(i16 (anyext (i8 (X86setcc_c X86_COND_B, EFLAGS)))), + (SETB_C16r)>; +def : Pat<(i32 (anyext (i8 (X86setcc_c X86_COND_B, EFLAGS)))), + (SETB_C32r)>; def : Pat<(i64 (anyext (i8 (X86setcc_c X86_COND_B, EFLAGS)))), (SETB_C64r)>; +def : Pat<(i16 (sext (i8 (X86setcc_c X86_COND_B, EFLAGS)))), + (SETB_C16r)>; +def : Pat<(i32 (sext (i8 (X86setcc_c X86_COND_B, EFLAGS)))), + (SETB_C32r)>; +def : Pat<(i64 (sext (i8 (X86setcc_c X86_COND_B, EFLAGS)))), + (SETB_C64r)>; + //===----------------------------------------------------------------------===// // String Pseudo Instructions |