diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-24 00:47:47 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-24 00:47:47 +0000 |
commit | 74c8d67af8fb217e9ec231a452f367f5a0d3044b (patch) | |
tree | 4b0c58f65e85f7be1440bd613105325fa9b67f2d | |
parent | 084df627c82fdf4e1829723edf0a833b5bc31f89 (diff) | |
download | external_llvm-74c8d67af8fb217e9ec231a452f367f5a0d3044b.zip external_llvm-74c8d67af8fb217e9ec231a452f367f5a0d3044b.tar.gz external_llvm-74c8d67af8fb217e9ec231a452f367f5a0d3044b.tar.bz2 |
Switch SDTUnaryArithWithFlags to being modeled as a two-result
ISD node. The only change in the generated isel code are comments
like:
< // Src: (X86dec_flag:i16 GR16:i16:$src)
---
> // Src: (X86dec_flag:i16:i32 GR16:i16:$src)
because now it knows that X86dec_flag returns both an i16 (for the result)
and an i32 (for EFLAGS) in this case. Wewt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99369 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/X86/X86InstrInfo.td | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Target/X86/X86InstrInfo.td b/lib/Target/X86/X86InstrInfo.td index 212b039..b55aa44 100644 --- a/lib/Target/X86/X86InstrInfo.td +++ b/lib/Target/X86/X86InstrInfo.td @@ -28,8 +28,9 @@ def SDTX86Cmov : SDTypeProfile<1, 4, SDTCisVT<3, i8>, SDTCisVT<4, i32>]>; // Unary and binary operator instructions that set EFLAGS as a side-effect. -def SDTUnaryArithWithFlags : SDTypeProfile<1, 1, - [SDTCisInt<0>]>; +def SDTUnaryArithWithFlags : SDTypeProfile<2, 1, + [SDTCisInt<0>, SDTCisVT<1, i32>]>; + def SDTBinaryArithWithFlags : SDTypeProfile<1, 2, [SDTCisSameAs<0, 1>, SDTCisSameAs<0, 2>, @@ -167,6 +168,7 @@ def X86smul_flag : SDNode<"X86ISD::SMUL", SDTBinaryArithWithFlags, [SDNPCommutative]>; def X86umul_flag : SDNode<"X86ISD::UMUL", SDTUnaryArithWithFlags, [SDNPCommutative]>; + def X86inc_flag : SDNode<"X86ISD::INC", SDTUnaryArithWithFlags>; def X86dec_flag : SDNode<"X86ISD::DEC", SDTUnaryArithWithFlags>; def X86or_flag : SDNode<"X86ISD::OR", SDTBinaryArithWithFlags, |