diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-11-27 19:40:19 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-11-27 19:40:19 +0000 |
commit | 1cefde83ffcfe869e86ef1976667f47856087dd3 (patch) | |
tree | f4eec24bdacc3f5441b5ddb6f4bdbfb5498402ef | |
parent | 8bb91f77cb1488c19cb4bdb17b4af5f093d233fd (diff) | |
download | external_llvm-1cefde83ffcfe869e86ef1976667f47856087dd3.zip external_llvm-1cefde83ffcfe869e86ef1976667f47856087dd3.tar.gz external_llvm-1cefde83ffcfe869e86ef1976667f47856087dd3.tar.bz2 |
Merging r195575:
------------------------------------------------------------------------
r195575 | venkatra | 2013-11-24 12:07:35 -0800 (Sun, 24 Nov 2013) | 2 lines
[Sparc]: Implement LEA pattern for sparcv9.
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_34@195869 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/Sparc/SparcInstr64Bit.td | 6 | ||||
-rw-r--r-- | lib/Target/Sparc/SparcInstrInfo.td | 9 |
2 files changed, 11 insertions, 4 deletions
diff --git a/lib/Target/Sparc/SparcInstr64Bit.td b/lib/Target/Sparc/SparcInstr64Bit.td index 51397d8..8656de5 100644 --- a/lib/Target/Sparc/SparcInstr64Bit.td +++ b/lib/Target/Sparc/SparcInstr64Bit.td @@ -171,6 +171,12 @@ def : Pat<(SPcmpicc i64:$a, (i64 simm13:$b)), (CMPri $a, (as_i32imm $b))>; def : Pat<(ctpop i64:$src), (POPCrr $src)>; +// "LEA" form of add +def LEAX_ADDri : F3_2<2, 0b000000, + (outs I64Regs:$dst), (ins MEMri:$addr), + "add ${addr:arith}, $dst", + [(set iPTR:$dst, ADDRri:$addr)]>; + } // Predicates = [Is64Bit] diff --git a/lib/Target/Sparc/SparcInstrInfo.td b/lib/Target/Sparc/SparcInstrInfo.td index 8dadc89..ef7a114 100644 --- a/lib/Target/Sparc/SparcInstrInfo.td +++ b/lib/Target/Sparc/SparcInstrInfo.td @@ -502,10 +502,11 @@ defm SRA : F3_12<"sra", 0b100111, sra>; defm ADD : F3_12<"add", 0b000000, add>; // "LEA" forms of add (patterns to make tblgen happy) -def LEA_ADDri : F3_2<2, 0b000000, - (outs IntRegs:$dst), (ins MEMri:$addr), - "add ${addr:arith}, $dst", - [(set iPTR:$dst, ADDRri:$addr)]>; +let Predicates = [Is32Bit] in + def LEA_ADDri : F3_2<2, 0b000000, + (outs IntRegs:$dst), (ins MEMri:$addr), + "add ${addr:arith}, $dst", + [(set iPTR:$dst, ADDRri:$addr)]>; let Defs = [ICC] in defm ADDCC : F3_12<"addcc", 0b010000, addc>; |