Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(339)

Side by Side Diff: lib/Target/ARM/ARMInstrInfo.td

Issue 939073008: Rebased PNaCl localmods in LLVM to 223109 (Closed)
Patch Set: undo localmod Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/Target/ARM/ARMISelLowering.cpp ('k') | lib/Target/ARM/ARMLoadStoreOptimizer.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- ARMInstrInfo.td - Target Description for ARM Target -*- tablegen -*-===// 1 //===- ARMInstrInfo.td - Target Description for ARM Target -*- tablegen -*-===//
2 // 2 //
3 // The LLVM Compiler Infrastructure 3 // The LLVM Compiler Infrastructure
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 // 9 //
10 // This file describes the ARM instructions in TableGen format. 10 // This file describes the ARM instructions in TableGen format.
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 def SDT_ARM64bitmlal : SDTypeProfile<2,4, [ SDTCisVT<0, i32>, SDTCisVT<1, i32>, 90 def SDT_ARM64bitmlal : SDTypeProfile<2,4, [ SDTCisVT<0, i32>, SDTCisVT<1, i32>,
91 SDTCisVT<2, i32>, SDTCisVT<3, i32>, 91 SDTCisVT<2, i32>, SDTCisVT<3, i32>,
92 SDTCisVT<4, i32>, SDTCisVT<5, i32> ] >; 92 SDTCisVT<4, i32>, SDTCisVT<5, i32> ] >;
93 def ARMUmlal : SDNode<"ARMISD::UMLAL", SDT_ARM64bitmlal>; 93 def ARMUmlal : SDNode<"ARMISD::UMLAL", SDT_ARM64bitmlal>;
94 def ARMSmlal : SDNode<"ARMISD::SMLAL", SDT_ARM64bitmlal>; 94 def ARMSmlal : SDNode<"ARMISD::SMLAL", SDT_ARM64bitmlal>;
95 95
96 // Node definitions. 96 // Node definitions.
97 def ARMWrapper : SDNode<"ARMISD::Wrapper", SDTIntUnaryOp>; 97 def ARMWrapper : SDNode<"ARMISD::Wrapper", SDTIntUnaryOp>;
98 def ARMWrapperPIC : SDNode<"ARMISD::WrapperPIC", SDTIntUnaryOp>; 98 def ARMWrapperPIC : SDNode<"ARMISD::WrapperPIC", SDTIntUnaryOp>;
99 def ARMWrapperJT : SDNode<"ARMISD::WrapperJT", SDTIntBinOp>; 99 def ARMWrapperJT : SDNode<"ARMISD::WrapperJT", SDTIntBinOp>;
100 // @LOCALMOD-START
101 // support non-inline jumptables
102 // we do not use the extre uid immediate that comes with ARMWrapperJT
103 // TODO(robertm): figure out what it is used for
104 def ARMWrapperJT2 : SDNode<"ARMISD::WrapperJT2", SDTIntUnaryOp>;
105 // Support for MOVW/MOVT'ing the GOT address directly into a register.
106 def ARMWrapperGOT : SDNode<"ARMISD::WrapperGOT", SDTPtrLeaf>;
107 // @LOCALMOD-END
100 108
101 def ARMcallseq_start : SDNode<"ISD::CALLSEQ_START", SDT_ARMCallSeqStart, 109 def ARMcallseq_start : SDNode<"ISD::CALLSEQ_START", SDT_ARMCallSeqStart,
102 [SDNPHasChain, SDNPSideEffect, SDNPOutGlue]>; 110 [SDNPHasChain, SDNPSideEffect, SDNPOutGlue]>;
103 def ARMcallseq_end : SDNode<"ISD::CALLSEQ_END", SDT_ARMCallSeqEnd, 111 def ARMcallseq_end : SDNode<"ISD::CALLSEQ_END", SDT_ARMCallSeqEnd,
104 [SDNPHasChain, SDNPSideEffect, 112 [SDNPHasChain, SDNPSideEffect,
105 SDNPOptInGlue, SDNPOutGlue]>; 113 SDNPOptInGlue, SDNPOutGlue]>;
106 def ARMcopystructbyval : SDNode<"ARMISD::COPY_STRUCT_BYVAL" , 114 def ARMcopystructbyval : SDNode<"ARMISD::COPY_STRUCT_BYVAL" ,
107 SDT_ARMStructByVal, 115 SDT_ARMStructByVal,
108 [SDNPHasChain, SDNPInGlue, SDNPOutGlue, 116 [SDNPHasChain, SDNPInGlue, SDNPOutGlue,
109 SDNPMayStore, SDNPMayLoad]>; 117 SDNPMayStore, SDNPMayLoad]>;
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 308
301 // Cortex-A9 prefers VMOVSR to VMOVDRR even when using NEON for scalar FP, as 309 // Cortex-A9 prefers VMOVSR to VMOVDRR even when using NEON for scalar FP, as
302 // this allows more effective execution domain optimization. See 310 // this allows more effective execution domain optimization. See
303 // setExecutionDomain(). 311 // setExecutionDomain().
304 def UseVMOVSR : Predicate<"Subtarget->isCortexA9() || !Subtarget->useNEONForSing lePrecisionFP()">; 312 def UseVMOVSR : Predicate<"Subtarget->isCortexA9() || !Subtarget->useNEONForSing lePrecisionFP()">;
305 def DontUseVMOVSR : Predicate<"!Subtarget->isCortexA9() && Subtarget->useNEONFor SinglePrecisionFP()">; 313 def DontUseVMOVSR : Predicate<"!Subtarget->isCortexA9() && Subtarget->useNEONFor SinglePrecisionFP()">;
306 314
307 def IsLE : Predicate<"getTargetLowering()->isLittleEndian()">; 315 def IsLE : Predicate<"getTargetLowering()->isLittleEndian()">;
308 def IsBE : Predicate<"getTargetLowering()->isBigEndian()">; 316 def IsBE : Predicate<"getTargetLowering()->isBigEndian()">;
309 317
318 // @LOCALMOD-BEGIN
319 def UseConstIslands : Predicate<"Subtarget->useConstIslands()">;
320 def DontUseConstIslands : Predicate<"!Subtarget->useConstIslands()">;
321 // @LOCALMOD-END
322
310 //===----------------------------------------------------------------------===// 323 //===----------------------------------------------------------------------===//
311 // ARM Flag Definitions. 324 // ARM Flag Definitions.
312 325
313 class RegConstraint<string C> { 326 class RegConstraint<string C> {
314 string Constraints = C; 327 string Constraints = C;
315 } 328 }
316 329
317 //===----------------------------------------------------------------------===// 330 //===----------------------------------------------------------------------===//
318 // ARM specific transformation functions and pattern fragments. 331 // ARM specific transformation functions and pattern fragments.
319 // 332 //
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 } 875 }
863 876
864 877
865 // addrmode2 := reg +/- imm12 878 // addrmode2 := reg +/- imm12
866 // := reg +/- reg shop imm 879 // := reg +/- reg shop imm
867 // 880 //
868 // FIXME: addrmode2 should be refactored the rest of the way to always 881 // FIXME: addrmode2 should be refactored the rest of the way to always
869 // use explicit imm vs. reg versions above (addrmode_imm12 and ldst_so_reg). 882 // use explicit imm vs. reg versions above (addrmode_imm12 and ldst_so_reg).
870 def AddrMode2AsmOperand : AsmOperandClass { let Name = "AddrMode2"; } 883 def AddrMode2AsmOperand : AsmOperandClass { let Name = "AddrMode2"; }
871 def addrmode2 : Operand<i32>, 884 def addrmode2 : Operand<i32>,
872 ComplexPattern<i32, 3, "SelectAddrMode2", []> { 885 ComplexPattern<i32, 3, "SelectAddrMode2", [],
886 [SDNPWantRoot]> { // @LOCALMOD
873 let EncoderMethod = "getAddrMode2OpValue"; 887 let EncoderMethod = "getAddrMode2OpValue";
874 let PrintMethod = "printAddrMode2Operand"; 888 let PrintMethod = "printAddrMode2Operand";
875 let ParserMatchClass = AddrMode2AsmOperand; 889 let ParserMatchClass = AddrMode2AsmOperand;
876 let MIOperandInfo = (ops GPR:$base, GPR:$offsreg, i32imm:$offsimm); 890 let MIOperandInfo = (ops GPR:$base, GPR:$offsreg, i32imm:$offsimm);
877 } 891 }
878 892
879 def PostIdxRegShiftedAsmOperand : AsmOperandClass { 893 def PostIdxRegShiftedAsmOperand : AsmOperandClass {
880 let Name = "PostIdxRegShifted"; 894 let Name = "PostIdxRegShifted";
881 let ParserMethod = "parsePostIdxReg"; 895 let ParserMethod = "parsePostIdxReg";
882 } 896 }
(...skipping 19 matching lines...) Expand all
902 let MIOperandInfo = (ops GPRnopc, i32imm); 916 let MIOperandInfo = (ops GPRnopc, i32imm);
903 } 917 }
904 918
905 919
906 // addrmode3 := reg +/- reg 920 // addrmode3 := reg +/- reg
907 // addrmode3 := reg +/- imm8 921 // addrmode3 := reg +/- imm8
908 // 922 //
909 // FIXME: split into imm vs. reg versions. 923 // FIXME: split into imm vs. reg versions.
910 def AddrMode3AsmOperand : AsmOperandClass { let Name = "AddrMode3"; } 924 def AddrMode3AsmOperand : AsmOperandClass { let Name = "AddrMode3"; }
911 class AddrMode3 : Operand<i32>, 925 class AddrMode3 : Operand<i32>,
912 ComplexPattern<i32, 3, "SelectAddrMode3", []> { 926 ComplexPattern<i32, 3, "SelectAddrMode3", [],
927 [SDNPWantRoot]> { // @LOCALMOD
913 let EncoderMethod = "getAddrMode3OpValue"; 928 let EncoderMethod = "getAddrMode3OpValue";
914 let ParserMatchClass = AddrMode3AsmOperand; 929 let ParserMatchClass = AddrMode3AsmOperand;
915 let MIOperandInfo = (ops GPR:$base, GPR:$offsreg, i32imm:$offsimm); 930 let MIOperandInfo = (ops GPR:$base, GPR:$offsreg, i32imm:$offsimm);
916 } 931 }
917 932
918 def addrmode3 : AddrMode3 933 def addrmode3 : AddrMode3
919 { 934 {
920 let PrintMethod = "printAddrMode3Operand<false>"; 935 let PrintMethod = "printAddrMode3Operand<false>";
921 } 936 }
922 937
(...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after
1798 let Inst{15-12} = Rt; 1813 let Inst{15-12} = Rt;
1799 let Inst{11-0} = shift{11-0}; 1814 let Inst{11-0} = shift{11-0};
1800 } 1815 }
1801 } 1816 }
1802 1817
1803 1818
1804 //===----------------------------------------------------------------------===// 1819 //===----------------------------------------------------------------------===//
1805 // Instructions 1820 // Instructions
1806 //===----------------------------------------------------------------------===// 1821 //===----------------------------------------------------------------------===//
1807 1822
1823 // @LOCALMOD-START
1824
1825 def SFI_GUARD_LOADSTORE :
1826 PseudoInst<(outs GPR:$dst), (ins GPR:$a, pred:$p), NoItinerary, []>;
1827
1828 let Defs = [CPSR] in
1829 def SFI_GUARD_LOADSTORE_TST :
1830 PseudoInst<(outs), (ins GPR:$a), NoItinerary, []>;
1831
1832 // Like SFI_GUARD_LOADSTORE, but reserved for loads into SP.
1833 def SFI_GUARD_SP_LOAD :
1834 PseudoInst<(outs GPR:$dst), (ins GPR:$src, pred:$p), NoItinerary, []>;
1835
1836 def SFI_GUARD_INDIRECT_CALL :
1837 PseudoInst<(outs GPR:$dst), (ins GPR:$a, pred:$p), NoItinerary, []>;
1838
1839 def SFI_GUARD_INDIRECT_JMP :
1840 PseudoInst<(outs GPR:$dst), (ins GPR:$a, pred:$p), NoItinerary, []>;
1841
1842 def SFI_GUARD_CALL :
1843 PseudoInst<(outs), (ins pred:$p), NoItinerary, []>;
1844
1845 // NOTE: the BX_RET instruction hardcodes lr as well
1846 def SFI_GUARD_RETURN :
1847 PseudoInst<(outs), (ins pred:$p), NoItinerary, []>;
1848
1849 def SFI_NOP_IF_AT_BUNDLE_END :
1850 PseudoInst<(outs), (ins), NoItinerary, []>;
1851
1852 // Note: intention is that $src and $dst are the same register.
1853 def SFI_DATA_MASK :
1854 PseudoInst<(outs GPR:$dst), (ins GPR:$src, pred:$p), NoItinerary, []>;
1855
1856 // @LOCALMOD-END
1857
1808 //===----------------------------------------------------------------------===// 1858 //===----------------------------------------------------------------------===//
1809 // Miscellaneous Instructions. 1859 // Miscellaneous Instructions.
1810 // 1860 //
1811 1861
1812 /// CONSTPOOL_ENTRY - This instruction represents a floating constant pool in 1862 /// CONSTPOOL_ENTRY - This instruction represents a floating constant pool in
1813 /// the function. The first operand is the ID# for this instruction, the second 1863 /// the function. The first operand is the ID# for this instruction, the second
1814 /// is the index into the MachineConstantPool that this is, the third is the 1864 /// is the index into the MachineConstantPool that this is, the third is the
1815 /// size in bytes of this constant pool entry. 1865 /// size in bytes of this constant pool entry.
1816 let hasSideEffects = 0, isNotDuplicable = 1 in 1866 let hasSideEffects = 0, isNotDuplicable = 1 in
1817 def CONSTPOOL_ENTRY : 1867 def CONSTPOOL_ENTRY :
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
2126 "bx", "\t$dst", [/* pattern left blank */]>, 2176 "bx", "\t$dst", [/* pattern left blank */]>,
2127 Requires<[IsARM, HasV4T]>, Sched<[WriteBr]> { 2177 Requires<[IsARM, HasV4T]>, Sched<[WriteBr]> {
2128 bits<4> dst; 2178 bits<4> dst;
2129 let Inst{27-4} = 0b000100101111111111110001; 2179 let Inst{27-4} = 0b000100101111111111110001;
2130 let Inst{3-0} = dst; 2180 let Inst{3-0} = dst;
2131 } 2181 }
2132 } 2182 }
2133 2183
2134 // SP is marked as a use to prevent stack-pointer assignments that appear 2184 // SP is marked as a use to prevent stack-pointer assignments that appear
2135 // immediately before calls from potentially appearing dead. 2185 // immediately before calls from potentially appearing dead.
2186
2187 // @LOCALMOD-START
2188 // Exception handling related Node and Instructions.
2189 // The conversion sequence is:
2190 // ISD::EH_RETURN -> ARMISD::EH_RETURN ->
2191 // ARMeh_return -> (stack change + indirect branch)
2192 //
2193 // ARMeh_return takes the place of regular return instruction
2194 // but takes two arguments.
2195 // R2, R3 are used for storing the offset and return address respectively.
2196 def SDT_ARMEHRET : SDTypeProfile<0, 2, [SDTCisInt<0>, SDTCisPtrTy<1>]>;
2197
2198 def ARMehret : SDNode<"ARMISD::EH_RETURN", SDT_ARMEHRET,
2199 [SDNPHasChain, SDNPOptInGlue]>;
2200
2201
2202 let isTerminator = 1, isReturn = 1, isBarrier = 1,
2203 Defs = [SP],
2204 Uses = [SP] in {
2205 def ARMeh_return : PseudoInst<(outs),
2206 (ins GPR:$spadj, GPR:$dst),
2207 IIC_Br,
2208 [(ARMehret GPR:$spadj, GPR:$dst)]>,
2209 Requires<[IsARM]>;
2210 }
2211 // @LOCALMOD-END
2212
2136 let isCall = 1, 2213 let isCall = 1,
2137 // FIXME: Do we really need a non-predicated version? If so, it should 2214 // FIXME: Do we really need a non-predicated version? If so, it should
2138 // at least be a pseudo instruction expanding to the predicated version 2215 // at least be a pseudo instruction expanding to the predicated version
2139 // at MC lowering time. 2216 // at MC lowering time.
2140 Defs = [LR], Uses = [SP] in { 2217 Defs = [LR], Uses = [SP] in {
2141 def BL : ABXI<0b1011, (outs), (ins bl_target:$func), 2218 def BL : ABXI<0b1011, (outs), (ins bl_target:$func),
2142 IIC_Br, "bl\t$func", 2219 IIC_Br, "bl\t$func",
2143 [(ARMcall tglobaladdr:$func)]>, 2220 [(ARMcall tglobaladdr:$func)]>,
2144 Requires<[IsARM]>, Sched<[WriteBrL]> { 2221 Requires<[IsARM]>, Sched<[WriteBrL]> {
2145 let Inst{31-28} = 0b1110; 2222 let Inst{31-28} = 0b1110;
(...skipping 1131 matching lines...) Expand 10 before | Expand all | Expand 10 after
3277 let Inst{25} = 1; 3354 let Inst{25} = 1;
3278 let DecoderMethod = "DecodeArmMOVTWInstruction"; 3355 let DecoderMethod = "DecodeArmMOVTWInstruction";
3279 } 3356 }
3280 3357
3281 def MOVTi16_ga_pcrel : PseudoInst<(outs GPR:$Rd), 3358 def MOVTi16_ga_pcrel : PseudoInst<(outs GPR:$Rd),
3282 (ins GPR:$src, i32imm:$addr, pclabel:$id), IIC_iMOVi, []>, 3359 (ins GPR:$src, i32imm:$addr, pclabel:$id), IIC_iMOVi, []>,
3283 Sched<[WriteALU]>; 3360 Sched<[WriteALU]>;
3284 3361
3285 } // Constraints 3362 } // Constraints
3286 3363
3364 // @LOCALMOD-BEGIN
3365 // PIC / PC-relative versions of MOVi16/MOVTi16, which have an extra
3366 // operand representing the ID of the PICADD instruction that corrects
3367 // for relativity. This is used to materialize addresses into
3368 // a register in a PC-relative manner.
3369 //
3370 // E.g. Rather than have an absolute address in $imm, and transferred to
3371 // a register with:
3372 // movw $Rd, :lower16:$imm
3373 // movt $Rd, :upper16:$imm
3374 //
3375 // we will instead have a relative offset:
3376 // movw $Rd, :lower16:$imm - ($pic_add_id + 8)
3377 // ...
3378 // movt $Rd, :upper16:$imm - ($pic_add_id + 8)
3379 // ...
3380 // $pic_add_id:
3381 // add $Rd, pc, $Rd
3382 //
3383 // One way these pseudo instructions (and the corresponding PICADD)
3384 // come about is during expansion of the MOVi32imm pseudo instruction
3385 // (see ARMExpandPseudo::ExpandMBB).
3386 // These pseudo instructions become real instructions when they are
3387 // finally lowered to MCInsts (e.g., at ARMAsmPrinter::EmitInstruction),
3388 // and the extra pclabel ID becomes part of the appropriate operand.
3389 //
3390 // NOTE: aside from adding the pclabel operand, all other operands should
3391 // be the same as the non-PIC versions to simplify conversion to the
3392 // non-pseudo instructions.
3393 let isReMaterializable = 1, isAsCheapAsAMove = 1, isMoveImm = 1,
3394 hasSideEffects = 0 in
3395 def MOVi16PIC : PseudoInst<(outs GPR:$Rd), (ins imm0_65535_expr:$imm,
3396 pclabel:$pic_add_id,
3397 pred:$p),
3398 IIC_iMOVi,
3399 []>,
3400 Requires<[IsARM, HasV6T2]>, UnaryDP;
3401
3402 let Constraints = "$src = $Rd" in
3403 def MOVTi16PIC : PseudoInst<(outs GPR:$Rd), (ins GPR:$src,
3404 imm0_65535_expr:$imm,
3405 pclabel:$pic_add_id,
3406 pred:$p),
3407 IIC_iMOVi,
3408 []>,
3409 UnaryDP, Requires<[IsARM, HasV6T2]>;
3410 // @LOCALMOD-END
3411
3412 // @LOCALMOD-BEGIN
3413 // Pseudo-instruction that will be expanded into MOVW / MOVT (PIC versions) w/
3414 // GOT as the operand.
3415 // The alternative is to create a constant pool entry with the (relative)
3416 // GOT address and load from the constant pool. This is currently used
3417 // when constant islands are turned off, since MOVW / MOVT will be faster.
3418 let isReMaterializable = 1, isMoveImm = 1, hasSideEffects = 0 in
3419 def MOVGOTAddr : PseudoInst<(outs GPR:$dst), (ins),
3420 IIC_iMOVix2, // will expand to two MOVi's
3421 []>,
3422 Requires<[IsARM, UseMovt]>;
3423
3424 def : ARMPat<(ARMWrapperGOT), (MOVGOTAddr)>;
3425 // @LOCALMOD-END
3426
3287 def : ARMPat<(or GPR:$src, 0xffff0000), (MOVTi16 GPR:$src, 0xffff)>, 3427 def : ARMPat<(or GPR:$src, 0xffff0000), (MOVTi16 GPR:$src, 0xffff)>,
3288 Requires<[IsARM, HasV6T2]>; 3428 Requires<[IsARM, HasV6T2]>;
3289 3429
3290 let Uses = [CPSR] in 3430 let Uses = [CPSR] in
3291 def RRX: PseudoInst<(outs GPR:$Rd), (ins GPR:$Rm), IIC_iMOVsi, 3431 def RRX: PseudoInst<(outs GPR:$Rd), (ins GPR:$Rm), IIC_iMOVsi,
3292 [(set GPR:$Rd, (ARMrrx GPR:$Rm))]>, UnaryDP, 3432 [(set GPR:$Rd, (ARMrrx GPR:$Rm))]>, UnaryDP,
3293 Requires<[IsARM]>, Sched<[WriteALU]>; 3433 Requires<[IsARM]>, Sched<[WriteALU]>;
3294 3434
3295 // These aren't really mov instructions, but we have to define them this way 3435 // These aren't really mov instructions, but we have to define them this way
3296 // due to flag operands. 3436 // due to flag operands.
(...skipping 1994 matching lines...) Expand 10 before | Expand all | Expand 10 after
5291 Requires<[IsARM, DontUseMovt]>; 5431 Requires<[IsARM, DontUseMovt]>;
5292 5432
5293 let AddedComplexity = 10 in 5433 let AddedComplexity = 10 in
5294 def MOV_ga_pcrel_ldr : PseudoInst<(outs GPR:$dst), (ins i32imm:$addr), 5434 def MOV_ga_pcrel_ldr : PseudoInst<(outs GPR:$dst), (ins i32imm:$addr),
5295 IIC_iMOVix2ld, 5435 IIC_iMOVix2ld,
5296 [(set GPR:$dst, (load (ARMWrapperPIC tglobaladdr:$addr)))]>, 5436 [(set GPR:$dst, (load (ARMWrapperPIC tglobaladdr:$addr)))]>,
5297 Requires<[IsARM, UseMovt]>; 5437 Requires<[IsARM, UseMovt]>;
5298 } // isReMaterializable 5438 } // isReMaterializable
5299 5439
5300 // ConstantPool, GlobalAddress, and JumpTable 5440 // ConstantPool, GlobalAddress, and JumpTable
5301 def : ARMPat<(ARMWrapper tconstpool :$dst), (LEApcrel tconstpool :$dst)>; 5441 def : ARMPat<(ARMWrapper tconstpool :$dst), (LEApcrel tconstpool :$dst)>,
5442 Requires<[IsARM, UseConstIslands]>; // @LOCALMOD see tconstpool
5443 // with DontUseConstIslands.
5302 def : ARMPat<(ARMWrapper tglobaladdr :$dst), (MOVi32imm tglobaladdr :$dst)>, 5444 def : ARMPat<(ARMWrapper tglobaladdr :$dst), (MOVi32imm tglobaladdr :$dst)>,
5303 Requires<[IsARM, UseMovt]>; 5445 Requires<[IsARM, UseMovt]>;
5446 // @LOCALMOD-START
5447 def : ARMPat<(ARMWrapper tconstpool :$dst), (MOVi32imm tconstpool :$dst)>,
5448 Requires<[IsARM, UseMovt, DontUseConstIslands]>;
5449 def : ARMPat<(ARMWrapperJT2 tjumptable :$dst), (MOVi32imm tjumptable :$dst)>,
5450 Requires<[IsARM, UseMovt]>;
5451 // @LOCALMOD-END
5304 def : ARMPat<(ARMWrapperJT tjumptable:$dst, imm:$id), 5452 def : ARMPat<(ARMWrapperJT tjumptable:$dst, imm:$id),
5305 (LEApcrelJT tjumptable:$dst, imm:$id)>; 5453 (LEApcrelJT tjumptable:$dst, imm:$id)>;
5306 5454
5307 // TODO: add,sub,and, 3-instr forms? 5455 // TODO: add,sub,and, 3-instr forms?
5308 5456
5309 // Tail calls. These patterns also apply to Thumb mode. 5457 // Tail calls. These patterns also apply to Thumb mode.
5310 def : Pat<(ARMtcret tcGPR:$dst), (TCRETURNri tcGPR:$dst)>; 5458 def : Pat<(ARMtcret tcGPR:$dst), (TCRETURNri tcGPR:$dst)>;
5311 def : Pat<(ARMtcret (i32 tglobaladdr:$dst)), (TCRETURNdi texternalsym:$dst)>; 5459 def : Pat<(ARMtcret (i32 tglobaladdr:$dst)), (TCRETURNdi texternalsym:$dst)>;
5312 def : Pat<(ARMtcret (i32 texternalsym:$dst)), (TCRETURNdi texternalsym:$dst)>; 5460 def : Pat<(ARMtcret (i32 texternalsym:$dst)), (TCRETURNdi texternalsym:$dst)>;
5313 5461
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
5646 5794
5647 // 'it' blocks in ARM mode just validate the predicates. The IT itself 5795 // 'it' blocks in ARM mode just validate the predicates. The IT itself
5648 // is discarded. 5796 // is discarded.
5649 def ITasm : ARMAsmPseudo<"it$mask $cc", (ins it_pred:$cc, it_mask:$mask)>, 5797 def ITasm : ARMAsmPseudo<"it$mask $cc", (ins it_pred:$cc, it_mask:$mask)>,
5650 ComplexDeprecationPredicate<"IT">; 5798 ComplexDeprecationPredicate<"IT">;
5651 5799
5652 let mayLoad = 1, mayStore =1, hasSideEffects = 1 in 5800 let mayLoad = 1, mayStore =1, hasSideEffects = 1 in
5653 def SPACE : PseudoInst<(outs GPR:$Rd), (ins i32imm:$size, GPR:$Rn), 5801 def SPACE : PseudoInst<(outs GPR:$Rd), (ins i32imm:$size, GPR:$Rn),
5654 NoItinerary, 5802 NoItinerary,
5655 [(set GPR:$Rd, (int_arm_space imm:$size, GPR:$Rn))]>; 5803 [(set GPR:$Rd, (int_arm_space imm:$size, GPR:$Rn))]>;
OLDNEW
« no previous file with comments | « lib/Target/ARM/ARMISelLowering.cpp ('k') | lib/Target/ARM/ARMLoadStoreOptimizer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698