summaryrefslogtreecommitdiff
path: root/test/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen')
-rw-r--r--test/CodeGen/ARM/2009-10-27-double-align.ll3
-rw-r--r--test/CodeGen/ARM/2010-03-18-ldm-rtrn.ll2
-rw-r--r--test/CodeGen/ARM/2010-05-18-PostIndexBug.ll6
-rw-r--r--test/CodeGen/ARM/2010-08-04-StackVariable.ll4
-rw-r--r--test/CodeGen/ARM/2010-10-25-ifcvt-ldm.ll6
-rw-r--r--test/CodeGen/ARM/2010-11-29-PrologueBug.ll2
-rw-r--r--test/CodeGen/ARM/2010-12-13-reloc-pic.ll100
-rw-r--r--test/CodeGen/ARM/2010-12-15-elf-lcomm.ll6
-rw-r--r--test/CodeGen/ARM/2011-03-10-DAGCombineCrash.ll47
-rw-r--r--test/CodeGen/ARM/2011-03-15-LdStMultipleBug.ll55
-rw-r--r--test/CodeGen/ARM/2011-03-23-PeepholeBug.ll41
-rw-r--r--test/CodeGen/ARM/2011-04-07-schediv.ll31
-rw-r--r--test/CodeGen/ARM/2011-04-11-MachineLICMBug.ll34
-rw-r--r--test/CodeGen/ARM/2011-04-12-AlignBug.ll11
-rw-r--r--test/CodeGen/ARM/2011-04-12-FastRegAlloc.ll15
-rw-r--r--test/CodeGen/ARM/2011-04-15-AndVFlagPeepholeBug.ll22
-rw-r--r--test/CodeGen/ARM/2011-04-15-RegisterCmpPeephole.ll41
-rw-r--r--test/CodeGen/ARM/2011-04-26-SchedTweak.ll70
-rw-r--r--test/CodeGen/ARM/2011-04-27-IfCvtBug.ll59
-rw-r--r--test/CodeGen/ARM/align.ll2
-rw-r--r--test/CodeGen/ARM/arguments.ll2
-rw-r--r--test/CodeGen/ARM/arm-and-tst-peephole.ll10
-rw-r--r--test/CodeGen/ARM/arm-returnaddr.ll4
-rw-r--r--test/CodeGen/ARM/avoid-cpsr-rmw.ll16
-rw-r--r--test/CodeGen/ARM/bx_fold.ll2
-rw-r--r--test/CodeGen/ARM/call-tc.ll2
-rw-r--r--test/CodeGen/ARM/carry.ll17
-rw-r--r--test/CodeGen/ARM/code-placement.ll4
-rw-r--r--test/CodeGen/ARM/constants.ll12
-rw-r--r--test/CodeGen/ARM/crash-greedy.ll84
-rw-r--r--test/CodeGen/ARM/debug-info-d16-reg.ll105
-rw-r--r--test/CodeGen/ARM/debug-info-qreg.ll94
-rw-r--r--test/CodeGen/ARM/debug-info-s16-reg.ll116
-rw-r--r--test/CodeGen/ARM/divmod.ll58
-rw-r--r--test/CodeGen/ARM/fabss.ll2
-rw-r--r--test/CodeGen/ARM/fadds.ll2
-rw-r--r--test/CodeGen/ARM/fast-isel-pred.ll58
-rw-r--r--test/CodeGen/ARM/fast-isel-redefinition.ll11
-rw-r--r--test/CodeGen/ARM/fast-isel-static.ll2
-rw-r--r--test/CodeGen/ARM/fast-isel.ll55
-rw-r--r--test/CodeGen/ARM/fcopysign.ll32
-rw-r--r--test/CodeGen/ARM/fdivs.ll2
-rw-r--r--test/CodeGen/ARM/fmacs.ll53
-rw-r--r--test/CodeGen/ARM/fmuls.ll2
-rw-r--r--test/CodeGen/ARM/fnmscs.ll17
-rw-r--r--test/CodeGen/ARM/fp-arg-shuffle.ll11
-rw-r--r--test/CodeGen/ARM/fp.ll2
-rw-r--r--test/CodeGen/ARM/fp_convert.ll8
-rw-r--r--test/CodeGen/ARM/fpcmp-opt.ll2
-rw-r--r--test/CodeGen/ARM/ifcvt10.ll4
-rw-r--r--test/CodeGen/ARM/ifcvt5.ll2
-rw-r--r--test/CodeGen/ARM/ifcvt6.ll2
-rw-r--r--test/CodeGen/ARM/ifcvt7.ll2
-rw-r--r--test/CodeGen/ARM/ifcvt8.ll2
-rw-r--r--test/CodeGen/ARM/indirectbr.ll27
-rw-r--r--test/CodeGen/ARM/inlineasm3.ll2
-rw-r--r--test/CodeGen/ARM/int-to-fp.ll19
-rw-r--r--test/CodeGen/ARM/ldm.ll10
-rw-r--r--test/CodeGen/ARM/ldrd.ll18
-rw-r--r--test/CodeGen/ARM/long.ll6
-rw-r--r--test/CodeGen/ARM/long_shift.ll10
-rw-r--r--test/CodeGen/ARM/lsr-code-insertion.ll8
-rw-r--r--test/CodeGen/ARM/lsr-on-unrolled-loops.ll5
-rw-r--r--test/CodeGen/ARM/memcpy-inline.ll12
-rw-r--r--test/CodeGen/ARM/neon_div.ll2
-rw-r--r--test/CodeGen/ARM/neon_shift.ll11
-rw-r--r--test/CodeGen/ARM/peephole-bitcast.ll26
-rw-r--r--test/CodeGen/ARM/prefetch.ll21
-rw-r--r--test/CodeGen/ARM/reg_sequence.ll22
-rw-r--r--test/CodeGen/ARM/rev.ll30
-rw-r--r--test/CodeGen/ARM/select-imm.ll4
-rw-r--r--test/CodeGen/ARM/select.ll23
-rw-r--r--test/CodeGen/ARM/select_xform.ll2
-rw-r--r--test/CodeGen/ARM/shifter_operand.ll10
-rw-r--r--test/CodeGen/ARM/shuffle.ll18
-rw-r--r--test/CodeGen/ARM/smul.ll16
-rw-r--r--test/CodeGen/ARM/str_pre-2.ll5
-rw-r--r--test/CodeGen/ARM/sub.ll11
-rw-r--r--test/CodeGen/ARM/thumb1-varalloc.ll6
-rw-r--r--test/CodeGen/ARM/trap.ll11
-rw-r--r--test/CodeGen/ARM/umulo-32.ll27
-rw-r--r--test/CodeGen/ARM/unaligned_load_store.ll16
-rw-r--r--test/CodeGen/ARM/undef-sext.ll14
-rw-r--r--test/CodeGen/ARM/va_arg.ll10
-rw-r--r--test/CodeGen/ARM/vbsl-constant.ll115
-rw-r--r--test/CodeGen/ARM/vcgt.ll7
-rw-r--r--test/CodeGen/ARM/vector-DAGCombine.ll18
-rw-r--r--test/CodeGen/ARM/vext.ll12
-rw-r--r--test/CodeGen/ARM/vfp.ll5
-rw-r--r--test/CodeGen/ARM/vld1.ll9
-rw-r--r--test/CodeGen/ARM/vld3.ll7
-rw-r--r--test/CodeGen/ARM/vldlane.ll13
-rw-r--r--test/CodeGen/ARM/vmul.ll155
-rw-r--r--test/CodeGen/ARM/vst3.ll2
-rw-r--r--test/CodeGen/Blackfin/2009-08-04-LowerExtract-Live.ll1
-rw-r--r--test/CodeGen/CellSPU/jumptable.ll2
-rw-r--r--test/CodeGen/CellSPU/loads.ll7
-rw-r--r--test/CodeGen/CellSPU/rotate_ops.ll6
-rw-r--r--test/CodeGen/CellSPU/shift_ops.ll61
-rw-r--r--test/CodeGen/CellSPU/stores.ll8
-rw-r--r--test/CodeGen/CellSPU/v2f32.ll12
-rw-r--r--test/CodeGen/Generic/crash.ll28
-rw-r--r--test/CodeGen/MBlaze/fsl.ll18
-rw-r--r--test/CodeGen/MBlaze/loop.ll6
-rw-r--r--test/CodeGen/Mips/2008-07-22-Cstpool.ll2
-rw-r--r--test/CodeGen/Mips/2008-07-23-fpcmp.ll4
-rw-r--r--test/CodeGen/Mips/2008-07-29-icmp.ll4
-rw-r--r--test/CodeGen/Mips/2008-08-06-Alloca.ll1
-rw-r--r--test/CodeGen/Mips/2010-07-20-Select.ll7
-rw-r--r--test/CodeGen/Mips/addc.ll13
-rw-r--r--test/CodeGen/Mips/analyzebranch.ll46
-rw-r--r--test/CodeGen/Mips/blockaddr.ll31
-rw-r--r--test/CodeGen/Mips/buildpairextractelementf64.ll23
-rwxr-xr-xtest/CodeGen/Mips/cmov.ll5
-rw-r--r--test/CodeGen/Mips/divrem.ll51
-rw-r--r--test/CodeGen/Mips/fpbr.ll119
-rw-r--r--test/CodeGen/Mips/fpcmp.ll23
-rw-r--r--test/CodeGen/Mips/internalfunc.ll52
-rw-r--r--test/CodeGen/Mips/largeimm1.ll13
-rw-r--r--test/CodeGen/Mips/o32_cc.ll52
-rw-r--r--test/CodeGen/Mips/o32_cc_vararg.ll278
-rw-r--r--test/CodeGen/Mips/select.ll196
-rw-r--r--test/CodeGen/PTX/add.ll70
-rw-r--r--test/CodeGen/PTX/bitwise.ll24
-rw-r--r--test/CodeGen/PTX/bra.ll24
-rw-r--r--test/CodeGen/PTX/exit.ll2
-rw-r--r--test/CodeGen/PTX/fdiv-sm10.ll15
-rw-r--r--test/CodeGen/PTX/fdiv-sm13.ll15
-rw-r--r--test/CodeGen/PTX/intrinsic.ll281
-rw-r--r--test/CodeGen/PTX/ld.ll431
-rw-r--r--test/CodeGen/PTX/llvm-intrinsic.ll56
-rw-r--r--test/CodeGen/PTX/mad.ll17
-rw-r--r--test/CodeGen/PTX/mov.ll59
-rw-r--r--test/CodeGen/PTX/mul.ll39
-rw-r--r--test/CodeGen/PTX/options.ll8
-rw-r--r--test/CodeGen/PTX/parameter-order.ll8
-rw-r--r--test/CodeGen/PTX/ret.ll2
-rw-r--r--test/CodeGen/PTX/setp.ll134
-rw-r--r--test/CodeGen/PTX/shl.ll2
-rw-r--r--test/CodeGen/PTX/shr.ll2
-rw-r--r--test/CodeGen/PTX/st.ll389
-rw-r--r--test/CodeGen/PTX/sub.ll70
-rw-r--r--test/CodeGen/PowerPC/2008-12-12-EH.ll2
-rw-r--r--test/CodeGen/PowerPC/2010-05-03-retaddr1.ll1
-rw-r--r--test/CodeGen/PowerPC/Atomics-64.ll10
-rw-r--r--test/CodeGen/PowerPC/Frames-small.ll2
-rw-r--r--test/CodeGen/PowerPC/indirectbr.ll14
-rw-r--r--test/CodeGen/PowerPC/mulhs.ll2
-rw-r--r--test/CodeGen/PowerPC/ppc-prologue.ll4
-rw-r--r--test/CodeGen/SPARC/2011-01-11-FrameAddr.ll2
-rw-r--r--test/CodeGen/SystemZ/2009-07-10-BadIncomingArgOffset.ll3
-rw-r--r--test/CodeGen/Thumb/2009-08-20-ISelBug.ll2
-rw-r--r--test/CodeGen/Thumb/2010-01-15-local-alloc-spill-physical.ll20
-rw-r--r--test/CodeGen/Thumb/2010-07-15-debugOrdering.ll2
-rw-r--r--test/CodeGen/Thumb/dyn-stackalloc.ll27
-rw-r--r--test/CodeGen/Thumb/rev.ll56
-rw-r--r--test/CodeGen/Thumb2/2009-08-06-SpDecBug.ll2
-rw-r--r--test/CodeGen/Thumb2/2009-09-28-ITBlockBug.ll2
-rw-r--r--test/CodeGen/Thumb2/2009-10-15-ITBlockBranch.ll5
-rw-r--r--test/CodeGen/Thumb2/2010-03-15-AsmCCClobber.ll16
-rw-r--r--test/CodeGen/Thumb2/2010-11-22-EpilogueBug.ll2
-rw-r--r--test/CodeGen/Thumb2/2011-04-21-FILoweringBug.ll23
-rw-r--r--test/CodeGen/Thumb2/bfi.ll11
-rw-r--r--test/CodeGen/Thumb2/cross-rc-coalescing-2.ll2
-rw-r--r--test/CodeGen/Thumb2/ldr-str-imm12.ll4
-rw-r--r--test/CodeGen/Thumb2/machine-licm.ll26
-rw-r--r--test/CodeGen/Thumb2/thumb2-ldrd.ll2
-rw-r--r--test/CodeGen/Thumb2/thumb2-lsr3.ll6
-rw-r--r--test/CodeGen/Thumb2/thumb2-ror.ll17
-rw-r--r--test/CodeGen/Thumb2/thumb2-ror2.ll11
-rw-r--r--test/CodeGen/Thumb2/thumb2-sbc.ll19
-rw-r--r--test/CodeGen/Thumb2/thumb2-sub3.ll10
-rw-r--r--test/CodeGen/Thumb2/thumb2-sub5.ll7
-rw-r--r--test/CodeGen/Thumb2/thumb2-uxtb.ll4
-rw-r--r--test/CodeGen/X86/2007-01-08-X86-64-Pointer.ll7
-rw-r--r--test/CodeGen/X86/2007-04-25-MMX-PADDQ.ll4
-rw-r--r--test/CodeGen/X86/2007-05-05-Personality.ll5
-rw-r--r--test/CodeGen/X86/2007-07-03-GR64ToVR64.ll8
-rw-r--r--test/CodeGen/X86/2007-07-18-Vector-Extract.ll6
-rw-r--r--test/CodeGen/X86/2007-09-17-ObjcFrameEH.ll4
-rw-r--r--test/CodeGen/X86/2007-09-27-LDIntrinsics.ll4
-rw-r--r--test/CodeGen/X86/2008-02-22-ReMatBug.ll2
-rw-r--r--test/CodeGen/X86/2008-03-18-CoalescerBug.ll4
-rw-r--r--test/CodeGen/X86/2008-04-02-unnamedEH.ll2
-rw-r--r--test/CodeGen/X86/2008-04-16-ReMatBug.ll2
-rw-r--r--test/CodeGen/X86/2008-07-11-SpillerBug.ll1
-rw-r--r--test/CodeGen/X86/2008-07-19-movups-spills.ll6
-rw-r--r--test/CodeGen/X86/2008-08-05-SpillerBug.ll44
-rw-r--r--test/CodeGen/X86/2008-09-18-inline-asm-2.ll6
-rw-r--r--test/CodeGen/X86/2008-12-12-PrivateEHSymbol.ll6
-rw-r--r--test/CodeGen/X86/2009-02-20-PreAllocSplit-Crash.ll2
-rw-r--r--test/CodeGen/X86/2009-03-11-CoalescerBug.ll85
-rw-r--r--test/CodeGen/X86/2009-03-16-SpillerBug.ll2
-rw-r--r--test/CodeGen/X86/2009-04-20-LinearScanOpt.ll2
-rw-r--r--test/CodeGen/X86/2009-04-21-NoReloadImpDef.ll2
-rw-r--r--test/CodeGen/X86/2009-04-24.ll2
-rw-r--r--test/CodeGen/X86/2010-02-19-TailCallRetAddrBug.ll2
-rw-r--r--test/CodeGen/X86/2010-04-23-mmx-movdq2q.ll5
-rw-r--r--test/CodeGen/X86/2010-05-03-CoalescerSubRegClobber.ll4
-rw-r--r--test/CodeGen/X86/2010-05-25-DotDebugLoc.ll1
-rw-r--r--test/CodeGen/X86/2010-05-26-DotDebugLoc.ll18
-rw-r--r--test/CodeGen/X86/2010-05-28-Crash.ll1
-rw-r--r--test/CodeGen/X86/2010-06-01-DeadArg-DbgInfo.ll3
-rw-r--r--test/CodeGen/X86/2010-08-04-StackVariable.ll4
-rw-r--r--test/CodeGen/X86/2010-09-17-SideEffectsInChain.ll10
-rw-r--r--test/CodeGen/X86/2010-09-30-CMOV-JumpTable-PHI.ll2
-rw-r--r--test/CodeGen/X86/2011-01-24-DbgValue-Before-Use.ll1
-rw-r--r--test/CodeGen/X86/2011-02-27-Fpextend.ll7
-rw-r--r--test/CodeGen/X86/2011-03-02-DAGCombiner.ll51
-rw-r--r--test/CodeGen/X86/2011-03-08-Sched-crash.ll56
-rw-r--r--test/CodeGen/X86/2011-03-09-Physreg-Coalescing.ll22
-rw-r--r--test/CodeGen/X86/2011-03-30-CreateFixedObjCrash.ll10
-rw-r--r--test/CodeGen/X86/2011-04-13-SchedCmpJmp.ll65
-rw-r--r--test/CodeGen/X86/3dnow-intrinsics.ll297
-rw-r--r--test/CodeGen/X86/MachineSink-PHIUse.ll2
-rw-r--r--test/CodeGen/X86/SIMD/dg.exp5
-rw-r--r--test/CodeGen/X86/SIMD/notvunpcklpd.ll20
-rw-r--r--test/CodeGen/X86/SIMD/notvunpcklps.ll20
-rw-r--r--test/CodeGen/X86/SIMD/vunpcklpd.ll20
-rw-r--r--test/CodeGen/X86/SIMD/vunpcklps.ll20
-rw-r--r--test/CodeGen/X86/abi-isel.ll5575
-rw-r--r--test/CodeGen/X86/add.ll15
-rw-r--r--test/CodeGen/X86/adde-carry.ll26
-rw-r--r--test/CodeGen/X86/aliases.ll2
-rw-r--r--test/CodeGen/X86/alignment.ll6
-rw-r--r--test/CodeGen/X86/apm.ll11
-rw-r--r--test/CodeGen/X86/avoid-lea-scale2.ll4
-rw-r--r--test/CodeGen/X86/avx-intrinsics-x86.ll4
-rw-r--r--test/CodeGen/X86/bool-zext.ll35
-rw-r--r--test/CodeGen/X86/break-anti-dependencies.ll3
-rw-r--r--test/CodeGen/X86/byval.ll3
-rw-r--r--test/CodeGen/X86/byval2.ll27
-rw-r--r--test/CodeGen/X86/byval3.ll27
-rw-r--r--test/CodeGen/X86/byval4.ll27
-rw-r--r--test/CodeGen/X86/byval5.ll27
-rw-r--r--test/CodeGen/X86/call-push.ll16
-rw-r--r--test/CodeGen/X86/coalesce-esp.ll2
-rw-r--r--test/CodeGen/X86/coalescer-commute2.ll9
-rw-r--r--test/CodeGen/X86/coalescer-cross.ll6
-rw-r--r--test/CodeGen/X86/commute-two-addr.ll3
-rw-r--r--test/CodeGen/X86/constant-pool-remat-0.ll17
-rw-r--r--test/CodeGen/X86/convert-2-addr-3-addr-inc64.ll10
-rw-r--r--test/CodeGen/X86/crash.ll18
-rw-r--r--test/CodeGen/X86/dbg-declare-arg.ll123
-rw-r--r--test/CodeGen/X86/dbg-file-name.ll19
-rw-r--r--test/CodeGen/X86/dbg-merge-loc-entry.ll3
-rw-r--r--test/CodeGen/X86/dbg-value-inlined-parameter.ll1
-rw-r--r--test/CodeGen/X86/dbg-value-location.ll1
-rw-r--r--test/CodeGen/X86/dbg-value-range.ll17
-rw-r--r--test/CodeGen/X86/divide-by-constant.ll11
-rw-r--r--test/CodeGen/X86/dyn-stackalloc.ll9
-rw-r--r--test/CodeGen/X86/fast-isel-gep.ll19
-rw-r--r--test/CodeGen/X86/fast-isel-i1.ll39
-rw-r--r--test/CodeGen/X86/fast-isel-shift-imm.ll8
-rw-r--r--test/CodeGen/X86/fast-isel-x86-64.ll262
-rw-r--r--test/CodeGen/X86/fast-isel-x86.ll17
-rw-r--r--test/CodeGen/X86/fast-isel.ll11
-rw-r--r--test/CodeGen/X86/fold-mul-lohi.ll5
-rw-r--r--test/CodeGen/X86/fold-pcmpeqd-0.ll16
-rw-r--r--test/CodeGen/X86/fold-pcmpeqd-2.ll17
-rw-r--r--test/CodeGen/X86/fold-zext-trunc.ll23
-rw-r--r--test/CodeGen/X86/fp-stack-compare.ll14
-rw-r--r--test/CodeGen/X86/fp-trunc.ll35
-rw-r--r--test/CodeGen/X86/global-sections-tls.ll2
-rw-r--r--test/CodeGen/X86/global-sections.ll6
-rw-r--r--test/CodeGen/X86/h-register-store.ll32
-rw-r--r--test/CodeGen/X86/h-registers-0.ll26
-rw-r--r--test/CodeGen/X86/h-registers-1.ll2
-rw-r--r--test/CodeGen/X86/hidden-vis-pic.ll2
-rw-r--r--test/CodeGen/X86/i64-mem-copy.ll8
-rw-r--r--test/CodeGen/X86/iabs.ll11
-rw-r--r--test/CodeGen/X86/isel-sink3.ll6
-rw-r--r--test/CodeGen/X86/lea-3.ll17
-rw-r--r--test/CodeGen/X86/lock-inst-encoding.ll5
-rw-r--r--test/CodeGen/X86/loop-strength-reduce4.ll6
-rw-r--r--test/CodeGen/X86/lsr-interesting-step.ll4
-rw-r--r--test/CodeGen/X86/lsr-quadratic-expand.ll22
-rw-r--r--test/CodeGen/X86/lsr-redundant-addressing.ll45
-rw-r--r--test/CodeGen/X86/lsr-reuse-trunc.ll5
-rw-r--r--test/CodeGen/X86/lsr-reuse.ll1
-rw-r--r--test/CodeGen/X86/machine-cse.ll4
-rw-r--r--test/CodeGen/X86/mcinst-lowering-cmp0.ll68
-rw-r--r--test/CodeGen/X86/mmx-copy-gprs.ll10
-rw-r--r--test/CodeGen/X86/narrow-shl-cst.ll101
-rw-r--r--test/CodeGen/X86/no-cfi.ll38
-rw-r--r--test/CodeGen/X86/optimize-max-3.ll4
-rw-r--r--test/CodeGen/X86/or-address.ll8
-rw-r--r--test/CodeGen/X86/peep-vector-extract-concat.ll7
-rw-r--r--test/CodeGen/X86/personality.ll22
-rw-r--r--test/CodeGen/X86/phi-bit-propagation.ll (renamed from test/CodeGen/X86/phi-constants.ll)20
-rw-r--r--test/CodeGen/X86/pic.ll2
-rw-r--r--test/CodeGen/X86/pmulld.ll12
-rw-r--r--test/CodeGen/X86/postra-licm.ll9
-rw-r--r--test/CodeGen/X86/pr2659.ll3
-rw-r--r--test/CodeGen/X86/pr3366.ll2
-rw-r--r--test/CodeGen/X86/pr3495-2.ll2
-rw-r--r--test/CodeGen/X86/pr3495.ll6
-rw-r--r--test/CodeGen/X86/pr9743.ll17
-rw-r--r--test/CodeGen/X86/pre-split1.ll2
-rw-r--r--test/CodeGen/X86/pre-split10.ll2
-rw-r--r--test/CodeGen/X86/pre-split11.ll2
-rw-r--r--test/CodeGen/X86/pre-split2.ll2
-rw-r--r--test/CodeGen/X86/pre-split3.ll2
-rw-r--r--test/CodeGen/X86/pre-split4.ll2
-rw-r--r--test/CodeGen/X86/pre-split5.ll2
-rw-r--r--test/CodeGen/X86/pre-split6.ll2
-rw-r--r--test/CodeGen/X86/pre-split7.ll2
-rw-r--r--test/CodeGen/X86/pre-split8.ll2
-rw-r--r--test/CodeGen/X86/pre-split9.ll2
-rw-r--r--test/CodeGen/X86/remat-scalar-zero.ll1
-rw-r--r--test/CodeGen/X86/scalar-min-max-fill-operand.ll13
-rw-r--r--test/CodeGen/X86/sext-i1.ll4
-rw-r--r--test/CodeGen/X86/shrink-compare.ll36
-rw-r--r--test/CodeGen/X86/sse-align-0.ll3
-rw-r--r--test/CodeGen/X86/sse-align-3.ll7
-rw-r--r--test/CodeGen/X86/sse-align-7.ll4
-rw-r--r--test/CodeGen/X86/sse-commute.ll2
-rw-r--r--test/CodeGen/X86/sse2.ll6
-rw-r--r--test/CodeGen/X86/sse3.ll12
-rw-r--r--test/CodeGen/X86/sse_reload_fold.ll5
-rw-r--r--test/CodeGen/X86/stdarg.ll3
-rw-r--r--test/CodeGen/X86/stride-nine-with-base-reg.ll5
-rw-r--r--test/CodeGen/X86/stride-reuse.ll5
-rw-r--r--test/CodeGen/X86/sub-with-overflow.ll22
-rw-r--r--test/CodeGen/X86/tail-opts.ll30
-rw-r--r--test/CodeGen/X86/tailcall-returndup-void.ll37
-rw-r--r--test/CodeGen/X86/tailcallbyval64.ll25
-rw-r--r--test/CodeGen/X86/tailcallstack64.ll12
-rw-r--r--test/CodeGen/X86/test-nofold.ll8
-rw-r--r--test/CodeGen/X86/twoaddr-lea.ll11
-rw-r--r--test/CodeGen/X86/umulo-64.ll28
-rw-r--r--test/CodeGen/X86/unaligned-load.ll4
-rw-r--r--test/CodeGen/X86/unknown-location.ll13
-rw-r--r--test/CodeGen/X86/unreachable-stack-protector.ll19
-rw-r--r--test/CodeGen/X86/v2f32.ll67
-rw-r--r--test/CodeGen/X86/vec_cast.ll4
-rw-r--r--test/CodeGen/X86/vec_set-8.ll7
-rw-r--r--test/CodeGen/X86/vec_shuffle-16.ll23
-rw-r--r--test/CodeGen/X86/vec_shuffle-17.ll7
-rw-r--r--test/CodeGen/X86/vec_uint_to_fp.ll11
-rw-r--r--test/CodeGen/X86/visibility.ll7
-rw-r--r--test/CodeGen/X86/widen_load-0.ll8
-rw-r--r--test/CodeGen/X86/win64_alloca_dynalloca.ll74
-rw-r--r--test/CodeGen/X86/win64_vararg.ll33
-rw-r--r--test/CodeGen/X86/win_chkstk.ll3
-rw-r--r--test/CodeGen/X86/x86-64-malloc.ll4
-rw-r--r--test/CodeGen/X86/zext-extract_subreg.ll1
-rw-r--r--test/CodeGen/X86/zext-sext.ll1
-rw-r--r--test/CodeGen/XCore/events.ll20
-rw-r--r--test/CodeGen/XCore/mul64.ll33
-rw-r--r--test/CodeGen/XCore/ps-intrinsics.ll18
-rw-r--r--test/CodeGen/XCore/resources.ll24
-rw-r--r--test/CodeGen/XCore/scavenging.ll52
-rw-r--r--test/CodeGen/XCore/sr-intrinsics.ll18
-rw-r--r--test/CodeGen/XCore/threads.ll67
-rw-r--r--test/CodeGen/XCore/trampoline.ll4
356 files changed, 9988 insertions, 3877 deletions
diff --git a/test/CodeGen/ARM/2009-10-27-double-align.ll b/test/CodeGen/ARM/2009-10-27-double-align.ll
index c31b116c55b2..b37de9dbbdfd 100644
--- a/test/CodeGen/ARM/2009-10-27-double-align.ll
+++ b/test/CodeGen/ARM/2009-10-27-double-align.ll
@@ -1,4 +1,5 @@
-; RUN: llc < %s -mtriple=arm-linux-gnueabi | FileCheck %s
+; RUN: llc < %s -mtriple=arm-linux-gnueabi | FileCheck %s
+; RUN: llc < %s -mtriple=arm-linux-gnueabi -regalloc=basic | FileCheck %s
@.str = private constant [1 x i8] zeroinitializer, align 1
diff --git a/test/CodeGen/ARM/2010-03-18-ldm-rtrn.ll b/test/CodeGen/ARM/2010-03-18-ldm-rtrn.ll
index d9e1a1486a3c..fee86008ad71 100644
--- a/test/CodeGen/ARM/2010-03-18-ldm-rtrn.ll
+++ b/test/CodeGen/ARM/2010-03-18-ldm-rtrn.ll
@@ -6,7 +6,7 @@ define i32 @bar(i32 %a) nounwind {
entry:
%0 = tail call i32 @foo(i32 %a) nounwind ; <i32> [#uses=1]
%1 = add nsw i32 %0, 3 ; <i32> [#uses=1]
-; CHECK: ldmia sp!, {r11, pc}
+; CHECK: pop {r11, pc}
; V4: pop
; V4-NEXT: mov pc, lr
ret i32 %1
diff --git a/test/CodeGen/ARM/2010-05-18-PostIndexBug.ll b/test/CodeGen/ARM/2010-05-18-PostIndexBug.ll
index 5ad1c09eda4a..df9dbca313f2 100644
--- a/test/CodeGen/ARM/2010-05-18-PostIndexBug.ll
+++ b/test/CodeGen/ARM/2010-05-18-PostIndexBug.ll
@@ -7,13 +7,13 @@
define zeroext i8 @t(%struct.foo* %this) noreturn optsize {
entry:
; ARM: t:
-; ARM: str r0, [r1], r0
+; ARM: str r2, [r1], r0
; THUMB: t:
; THUMB-NOT: str r0, [r1], r0
-; THUMB: str r0, [r1]
+; THUMB: str r2, [r1]
%0 = getelementptr inbounds %struct.foo* %this, i32 0, i32 1 ; <i64*> [#uses=1]
- store i32 undef, i32* inttoptr (i32 8 to i32*), align 8
+ store i32 0, i32* inttoptr (i32 8 to i32*), align 8
br i1 undef, label %bb.nph96, label %bb3
bb3: ; preds = %entry
diff --git a/test/CodeGen/ARM/2010-08-04-StackVariable.ll b/test/CodeGen/ARM/2010-08-04-StackVariable.ll
index f077d04803bd..25d38ed77425 100644
--- a/test/CodeGen/ARM/2010-08-04-StackVariable.ll
+++ b/test/CodeGen/ARM/2010-08-04-StackVariable.ll
@@ -1,5 +1,5 @@
-; RUN: llc -O0 -mtriple=arm-apple-darwin < %s | grep DW_OP_fbreg
-; Use DW_OP_fbreg in variable's location expression if the variable is in a stack slot.
+; RUN: llc -O0 -mtriple=arm-apple-darwin < %s | grep DW_OP_breg
+; Use DW_OP_breg in variable's location expression if the variable is in a stack slot.
%struct.SVal = type { i8*, i32 }
diff --git a/test/CodeGen/ARM/2010-10-25-ifcvt-ldm.ll b/test/CodeGen/ARM/2010-10-25-ifcvt-ldm.ll
index 163c9b030ec8..32d350e9c8b1 100644
--- a/test/CodeGen/ARM/2010-10-25-ifcvt-ldm.ll
+++ b/test/CodeGen/ARM/2010-10-25-ifcvt-ldm.ll
@@ -4,9 +4,9 @@
; was being treated as an instruction count.
; CHECK: push
-; CHECK: ldmia
-; CHECK: ldmia
-; CHECK: ldmia
+; CHECK: pop
+; CHECK: pop
+; CHECK: pop
define i32 @test(i32 %x) {
entry:
diff --git a/test/CodeGen/ARM/2010-11-29-PrologueBug.ll b/test/CodeGen/ARM/2010-11-29-PrologueBug.ll
index 8d7541feae94..e3c18cefd51d 100644
--- a/test/CodeGen/ARM/2010-11-29-PrologueBug.ll
+++ b/test/CodeGen/ARM/2010-11-29-PrologueBug.ll
@@ -10,7 +10,7 @@ entry:
; ARM: bl _foo
; ARM: bl _foo
; ARM: bl _foo
-; ARM: ldmia sp!, {r7, pc}
+; ARM: pop {r7, pc}
; THUMB2: t:
; THUMB2: push
diff --git a/test/CodeGen/ARM/2010-12-13-reloc-pic.ll b/test/CodeGen/ARM/2010-12-13-reloc-pic.ll
deleted file mode 100644
index d5aefbee197c..000000000000
--- a/test/CodeGen/ARM/2010-12-13-reloc-pic.ll
+++ /dev/null
@@ -1,100 +0,0 @@
-; RUN: llc %s -mtriple=armv7-linux-gnueabi -relocation-model=pic -filetype=obj -o - | \
-; RUN: elf-dump --dump-section-data | FileCheck -check-prefix=PIC01 %s
-
-;; FIXME: Reduce this test further, or even better,
-;; redo as .s -> .o test once ARM AsmParser is working better
-
-; ModuleID = 'large2.pnacl.bc'
-target triple = "armv7-none-linux-gnueabi"
-
-%struct._Bigint = type { %struct._Bigint*, i32, i32, i32, i32, [1 x i32] }
-%struct.__FILE = type { i8*, i32, i32, i16, i16, %struct.__sbuf, i32, %struct._reent*, i8*, i32 (%struct._reent*, i8*, i8*, i32)*, i32 (%struct._reent*, i8*, i8*, i32)*, i32 (%struct._reent*, i8*, i32, i32)*, i32 (%struct._reent*, i8*)*, %struct.__sbuf, i8*, i32, [3 x i8], [1 x i8], %struct.__sbuf, i32, i32, %struct._flock_t, %struct._mbstate_t, i32 }
-%struct.__sbuf = type { i8*, i32 }
-%struct.__tm = type { i32, i32, i32, i32, i32, i32, i32, i32, i32 }
-%struct._atexit = type { %struct._atexit*, i32, [32 x void ()*], %struct._on_exit_args* }
-%struct._flock_t = type { i32, i32, i32, i32, i32 }
-%struct._glue = type { %struct._glue*, i32, %struct.__FILE* }
-%struct._mbstate_t = type { i32, %union.anon }
-%struct._misc_reent = type { i8*, %struct._mbstate_t, %struct._mbstate_t, %struct._mbstate_t, [8 x i8], i32, %struct._mbstate_t, %struct._mbstate_t, %struct._mbstate_t, %struct._mbstate_t, %struct._mbstate_t }
-%struct._mprec = type { %struct._Bigint*, i32, %struct._Bigint*, %struct._Bigint** }
-%struct._on_exit_args = type { [32 x i8*], [32 x i8*], i32, i32 }
-%struct._rand48 = type { [3 x i16], [3 x i16], i16, i64 }
-%struct._reent = type { %struct.__FILE*, %struct.__FILE*, %struct.__FILE*, i32, i32, i8*, i32, i32, i8*, %struct._mprec*, void (%struct._reent*)*, i32, i32, i8*, %struct._rand48*, %struct.__tm*, i8*, void (i32)**, %struct._atexit*, %struct._atexit, %struct._glue, %struct.__FILE*, %struct._misc_reent*, i8* }
-%union.anon = type { i32 }
-
-@buf = constant [2 x i8] c"x\00", align 4
-@_impure_ptr = external thread_local global %struct._reent*
-@.str = private constant [22 x i8] c"This should fault...\0A\00", align 4
-@.str1 = private constant [40 x i8] c"We're still running. This is not good.\0A\00", align 4
-
-define i32 @main() nounwind {
-entry:
- %0 = load %struct._reent** @_impure_ptr, align 4
- %1 = getelementptr inbounds %struct._reent* %0, i32 0, i32 1
- %2 = load %struct.__FILE** %1, align 4
- %3 = bitcast %struct.__FILE* %2 to i8*
- %4 = tail call i32 @fwrite(i8* getelementptr inbounds ([22 x i8]* @.str, i32 0, i32 0), i32 1, i32 21, i8* %3) nounwind
- %5 = load %struct._reent** @_impure_ptr, align 4
- %6 = getelementptr inbounds %struct._reent* %5, i32 0, i32 1
- %7 = load %struct.__FILE** %6, align 4
- %8 = tail call i32 @fflush(%struct.__FILE* %7) nounwind
- store i8 121, i8* getelementptr inbounds ([2 x i8]* @buf, i32 0, i32 0), align 4
- %9 = load %struct._reent** @_impure_ptr, align 4
- %10 = getelementptr inbounds %struct._reent* %9, i32 0, i32 1
- %11 = load %struct.__FILE** %10, align 4
- %12 = bitcast %struct.__FILE* %11 to i8*
- %13 = tail call i32 @fwrite(i8* getelementptr inbounds ([40 x i8]* @.str1, i32 0, i32 0), i32 1, i32 39, i8* %12) nounwind
- ret i32 1
-}
-
-
-; PIC01: Relocation 0x00000000
-; PIC01-NEXT: 'r_offset', 0x0000001c
-; PIC01-NEXT: 'r_sym'
-; PIC01-NEXT: 'r_type', 0x0000001b
-
-
-; PIC01: Relocation 0x00000001
-; PIC01-NEXT: 'r_offset', 0x00000038
-; PIC01-NEXT: 'r_sym'
-; PIC01-NEXT: 'r_type', 0x0000001b
-
-; PIC01: Relocation 0x00000002
-; PIC01-NEXT: 'r_offset', 0x00000044
-; PIC01-NEXT: 'r_sym'
-; PIC01-NEXT: 'r_type', 0x0000001b
-
-; PIC01: Relocation 0x00000003
-; PIC01-NEXT: 'r_offset', 0x00000070
-; PIC01-NEXT: 'r_sym'
-; PIC01-NEXT: 'r_type', 0x0000001b
-
-; PIC01: Relocation 0x00000004
-; PIC01-NEXT: 'r_offset', 0x0000007c
-; PIC01-NEXT: 'r_sym'
-; PIC01-NEXT: 'r_type', 0x00000019
-
-
-; PIC01: Relocation 0x00000005
-; PIC01-NEXT: 'r_offset', 0x00000080
-; PIC01-NEXT: 'r_sym'
-; PIC01-NEXT: 'r_type', 0x00000018
-
-; PIC01: Relocation 0x00000006
-; PIC01-NEXT: 'r_offset', 0x00000084
-; PIC01-NEXT: 'r_sym'
-; PIC01-NEXT: 'r_type', 0x00000068
-
-; PIC01: Relocation 0x00000007
-; PIC01-NEXT: 'r_offset', 0x00000088
-; PIC01-NEXT: 'r_sym'
-; PIC01-NEXT: 'r_type', 0x0000001a
-
-; PIC01: Relocation 0x00000008
-; PIC01-NEXT: 'r_offset', 0x0000008c
-; PIC01-NEXT: 'r_sym'
-; PIC01-NEXT: 'r_type', 0x00000018
-
-declare i32 @fwrite(i8* nocapture, i32, i32, i8* nocapture) nounwind
-
-declare i32 @fflush(%struct.__FILE* nocapture) nounwind
diff --git a/test/CodeGen/ARM/2010-12-15-elf-lcomm.ll b/test/CodeGen/ARM/2010-12-15-elf-lcomm.ll
index eaa34e7960fb..69d4a1482299 100644
--- a/test/CodeGen/ARM/2010-12-15-elf-lcomm.ll
+++ b/test/CodeGen/ARM/2010-12-15-elf-lcomm.ll
@@ -10,12 +10,12 @@
@STRIDE = internal global i32 8
; ASM: .type array00,%object @ @array00
-; ASM-NEXT: .lcomm array00,80 @ @array00
+; ASM-NEXT: .lcomm array00,80
; ASM-NEXT: .type _MergedGlobals,%object @ @_MergedGlobals
-; OBJ: Section 0x00000003
+; OBJ: Section 0x00000004
; OBJ-NEXT: '.bss'
; OBJ: 'array00'
@@ -24,7 +24,7 @@
; OBJ-NEXT: 'st_bind', 0x00000000
; OBJ-NEXT: 'st_type', 0x00000001
; OBJ-NEXT: 'st_other', 0x00000000
-; OBJ-NEXT: 'st_shndx', 0x00000003
+; OBJ-NEXT: 'st_shndx', 0x00000004
define i32 @main(i32 %argc) nounwind {
%1 = load i32* @sum, align 4
diff --git a/test/CodeGen/ARM/2011-03-10-DAGCombineCrash.ll b/test/CodeGen/ARM/2011-03-10-DAGCombineCrash.ll
new file mode 100644
index 000000000000..81babe0b4b19
--- /dev/null
+++ b/test/CodeGen/ARM/2011-03-10-DAGCombineCrash.ll
@@ -0,0 +1,47 @@
+; RUN: llc < %s -mtriple=thumbv7-apple-darwin10 -relocation-model=pic -disable-fp-elim -mcpu=cortex-a8
+
+; rdar://9117613
+
+%struct.mo = type { i32, %struct.mo_pops* }
+%struct.mo_pops = type { void (%struct.mo*)*, void (%struct.mo*)*, i32 (%struct.mo*, i32*, i32)*, i32 (%struct.mo*)*, i32 (%struct.mo*, i64, i32, i32, i32*, i64, i32)*, i32 (%struct.mo*, i64, i32, i64*, i32*, i32, i32, i32)*, i32 (%struct.mo*, i64, i32)*, i32 (%struct.mo*, i64, i64, i32)*, i32 (%struct.mo*, i64, i64, i32)*, i32 (%struct.mo*, i32)*, i32 (%struct.mo*)*, i32 (%struct.mo*, i32)*, i8* }
+%struct.ui = type { %struct.mo*, i32*, i32, i32*, i32*, i64, i32*, i32*, i32* }
+
+
+define internal fastcc i32 @t(i32* %vp, i32 %withfsize, i64 %filesize) nounwind {
+entry:
+ br i1 undef, label %bb1, label %bb
+
+bb: ; preds = %entry
+ unreachable
+
+bb1: ; preds = %entry
+ %0 = call %struct.ui* @vn_pp_to_ui(i32* undef) nounwind
+ call void @llvm.memset.p0i8.i32(i8* undef, i8 0, i32 40, i32 4, i1 false)
+ %1 = getelementptr inbounds %struct.ui* %0, i32 0, i32 0
+ store %struct.mo* undef, %struct.mo** %1, align 4
+ %2 = getelementptr inbounds %struct.ui* %0, i32 0, i32 5
+ %3 = load i64* %2, align 4
+ %4 = call i32 @mo_create_nnm(%struct.mo* undef, i64 %3, i32** undef) nounwind
+ br i1 undef, label %bb3, label %bb2
+
+bb2: ; preds = %bb1
+ unreachable
+
+bb3: ; preds = %bb1
+ br i1 undef, label %bb4, label %bb6
+
+bb4: ; preds = %bb3
+ %5 = call i32 @vn_size(i32* %vp, i64* %2, i32* undef) nounwind
+ unreachable
+
+bb6: ; preds = %bb3
+ ret i32 0
+}
+
+declare %struct.ui* @vn_pp_to_ui(i32*)
+
+declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i32, i1) nounwind
+
+declare i32 @mo_create_nnm(%struct.mo*, i64, i32**)
+
+declare i32 @vn_size(i32*, i64*, i32*)
diff --git a/test/CodeGen/ARM/2011-03-15-LdStMultipleBug.ll b/test/CodeGen/ARM/2011-03-15-LdStMultipleBug.ll
new file mode 100644
index 000000000000..ccda281e901e
--- /dev/null
+++ b/test/CodeGen/ARM/2011-03-15-LdStMultipleBug.ll
@@ -0,0 +1,55 @@
+; RUN: llc < %s -mtriple=thumbv7-apple-darwin10 -relocation-model=pic -disable-fp-elim -mcpu=cortex-a8 | FileCheck %s
+
+; Do not form Thumb2 ldrd / strd if the offset is not multiple of 4.
+; rdar://9133587
+
+%struct.Outer = type { i32, [2 x %"struct.Outer::Inner"] }
+%"struct.Outer::Inner" = type { i32, i32, i8, i8 }
+
+@oStruct = external global %struct.Outer, align 4
+
+define void @main() nounwind {
+; CHECK: main:
+; CHECK-NOT: ldrd
+; CHECK: mul
+for.body.lr.ph:
+ br label %for.body
+
+for.body: ; preds = %_Z14printIsNotZeroi.exit17.for.body_crit_edge, %for.body.lr.ph
+ %tmp3 = phi i1 [ false, %for.body.lr.ph ], [ %phitmp27, %_Z14printIsNotZeroi.exit17.for.body_crit_edge ]
+ %i.022 = phi i32 [ 0, %for.body.lr.ph ], [ %inc, %_Z14printIsNotZeroi.exit17.for.body_crit_edge ]
+ %x = getelementptr %struct.Outer* @oStruct, i32 0, i32 1, i32 %i.022, i32 0
+ %y = getelementptr %struct.Outer* @oStruct, i32 0, i32 1, i32 %i.022, i32 1
+ %inc = add i32 %i.022, 1
+ br i1 %tmp3, label %_Z14printIsNotZeroi.exit, label %if.then.i
+
+if.then.i: ; preds = %for.body
+ unreachable
+
+_Z14printIsNotZeroi.exit: ; preds = %for.body
+ %tmp8 = load i32* %x, align 4, !tbaa !0
+ %tmp11 = load i32* %y, align 4, !tbaa !0
+ %mul = mul nsw i32 %tmp11, %tmp8
+ %tobool.i14 = icmp eq i32 %mul, 0
+ br i1 %tobool.i14, label %_Z14printIsNotZeroi.exit17, label %if.then.i16
+
+if.then.i16: ; preds = %_Z14printIsNotZeroi.exit
+ unreachable
+
+_Z14printIsNotZeroi.exit17: ; preds = %_Z14printIsNotZeroi.exit
+ br i1 undef, label %_Z14printIsNotZeroi.exit17.for.body_crit_edge, label %for.end
+
+_Z14printIsNotZeroi.exit17.for.body_crit_edge: ; preds = %_Z14printIsNotZeroi.exit17
+ %b.phi.trans.insert = getelementptr %struct.Outer* @oStruct, i32 0, i32 1, i32 %inc, i32 3
+ %tmp3.pre = load i8* %b.phi.trans.insert, align 1, !tbaa !3
+ %phitmp27 = icmp eq i8 undef, 0
+ br label %for.body
+
+for.end: ; preds = %_Z14printIsNotZeroi.exit17
+ ret void
+}
+
+!0 = metadata !{metadata !"int", metadata !1}
+!1 = metadata !{metadata !"omnipotent char", metadata !2}
+!2 = metadata !{metadata !"Simple C/C++ TBAA", null}
+!3 = metadata !{metadata !"bool", metadata !1}
diff --git a/test/CodeGen/ARM/2011-03-23-PeepholeBug.ll b/test/CodeGen/ARM/2011-03-23-PeepholeBug.ll
new file mode 100644
index 000000000000..7c9af6f5e590
--- /dev/null
+++ b/test/CodeGen/ARM/2011-03-23-PeepholeBug.ll
@@ -0,0 +1,41 @@
+; RUN: llc < %s -mtriple=thumbv7-apple-darwin10 -relocation-model=pic -disable-fp-elim -mcpu=cortex-a8 | FileCheck %s
+
+; subs r4, #1
+; cmp r4, 0
+; bgt
+; cmp cannot be optimized away since it will clear the overflow bit.
+; gt / ge, lt, le conditions all depend on V bit.
+; rdar://9172742
+
+define i32 @t() nounwind {
+; CHECK: t:
+entry:
+ br label %bb2
+
+bb: ; preds = %bb2
+ %0 = tail call i32 @rand() nounwind
+ %1 = icmp eq i32 %0, 50
+ br i1 %1, label %bb3, label %bb1
+
+bb1: ; preds = %bb
+ %tmp = tail call i32 @puts() nounwind
+ %indvar.next = add i32 %indvar, 1
+ br label %bb2
+
+bb2: ; preds = %bb1, %entry
+; CHECK: bb2
+; CHECK: subs [[REG:r[0-9]+]], #1
+; CHECK: cmp [[REG]], #0
+; CHECK: bgt
+ %indvar = phi i32 [ %indvar.next, %bb1 ], [ 0, %entry ]
+ %tries.0 = sub i32 2147483647, %indvar
+ %tmp1 = icmp sgt i32 %tries.0, 0
+ br i1 %tmp1, label %bb, label %bb3
+
+bb3: ; preds = %bb2, %bb
+ ret i32 0
+}
+
+declare i32 @rand()
+
+declare i32 @puts() nounwind
diff --git a/test/CodeGen/ARM/2011-04-07-schediv.ll b/test/CodeGen/ARM/2011-04-07-schediv.ll
new file mode 100644
index 000000000000..a61908fd7c45
--- /dev/null
+++ b/test/CodeGen/ARM/2011-04-07-schediv.ll
@@ -0,0 +1,31 @@
+; RUN: llc < %s -mcpu=cortex-a8 | FileCheck %s
+; Tests preRAsched support for VRegCycle interference.
+
+target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:32:64-v128:32:128-a0:0:32-n32"
+target triple = "thumbv7-apple-darwin10"
+
+define void @t(i32 %src_width, float* nocapture %src_copy_start, float* nocapture %dst_copy_start, i32 %src_copy_start_index) nounwind optsize {
+entry:
+ %src_copy_start6 = bitcast float* %src_copy_start to i8*
+ %0 = icmp eq i32 %src_width, 0
+ br i1 %0, label %return, label %bb
+
+; Make sure the scheduler schedules all uses of the preincrement
+; induction variable before defining the postincrement value.
+; CHECK: t:
+; CHECK-NOT: mov
+bb: ; preds = %entry, %bb
+ %j.05 = phi i32 [ %2, %bb ], [ 0, %entry ]
+ %tmp = mul i32 %j.05, %src_copy_start_index
+ %uglygep = getelementptr i8* %src_copy_start6, i32 %tmp
+ %src_copy_start_addr.04 = bitcast i8* %uglygep to float*
+ %dst_copy_start_addr.03 = getelementptr float* %dst_copy_start, i32 %j.05
+ %1 = load float* %src_copy_start_addr.04, align 4
+ store float %1, float* %dst_copy_start_addr.03, align 4
+ %2 = add i32 %j.05, 1
+ %exitcond = icmp eq i32 %2, %src_width
+ br i1 %exitcond, label %return, label %bb
+
+return: ; preds = %bb, %entry
+ ret void
+}
diff --git a/test/CodeGen/ARM/2011-04-11-MachineLICMBug.ll b/test/CodeGen/ARM/2011-04-11-MachineLICMBug.ll
new file mode 100644
index 000000000000..a9dd97182a4c
--- /dev/null
+++ b/test/CodeGen/ARM/2011-04-11-MachineLICMBug.ll
@@ -0,0 +1,34 @@
+; RUN: llc < %s -mtriple=thumbv7-apple-darwin -mcpu=cortex-a8 | FileCheck %s
+
+; Overly aggressive LICM simply adds copies of constants
+; rdar://9266679
+
+define zeroext i1 @t(i32* nocapture %A, i32 %size, i32 %value) nounwind readonly ssp {
+; CHECK: t:
+entry:
+ br label %for.cond
+
+for.cond:
+ %0 = phi i32 [ 0, %entry ], [ %inc, %for.inc ]
+ %cmp = icmp ult i32 %0, %size
+ br i1 %cmp, label %for.body, label %return
+
+for.body:
+; CHECK: %for.body
+; CHECK: movs r{{[0-9]+}}, #1
+ %arrayidx = getelementptr i32* %A, i32 %0
+ %tmp4 = load i32* %arrayidx, align 4
+ %cmp6 = icmp eq i32 %tmp4, %value
+ br i1 %cmp6, label %return, label %for.inc
+
+; CHECK: %for.cond
+; CHECK: movs r{{[0-9]+}}, #0
+
+for.inc:
+ %inc = add i32 %0, 1
+ br label %for.cond
+
+return:
+ %retval.0 = phi i1 [ true, %for.body ], [ false, %for.cond ]
+ ret i1 %retval.0
+}
diff --git a/test/CodeGen/ARM/2011-04-12-AlignBug.ll b/test/CodeGen/ARM/2011-04-12-AlignBug.ll
new file mode 100644
index 000000000000..317be94e86b0
--- /dev/null
+++ b/test/CodeGen/ARM/2011-04-12-AlignBug.ll
@@ -0,0 +1,11 @@
+; RUN: llc < %s | FileCheck %s
+target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:32:64-v128:32:128-a0:0:32-n32"
+target triple = "thumbv7-apple-darwin10.0.0"
+
+; CHECK: align 3
+@.v = linker_private unnamed_addr constant <4 x i32> <i32 1, i32 2, i32 3, i32 4>, align 8
+; CHECK: align 2
+@.strA = linker_private unnamed_addr constant [4 x i8] c"bar\00"
+; CHECK-NOT: align
+@.strB = linker_private unnamed_addr constant [4 x i8] c"foo\00", align 1
+@.strC = linker_private unnamed_addr constant [4 x i8] c"baz\00", section "__TEXT,__cstring,cstring_literals", align 1
diff --git a/test/CodeGen/ARM/2011-04-12-FastRegAlloc.ll b/test/CodeGen/ARM/2011-04-12-FastRegAlloc.ll
new file mode 100644
index 000000000000..eb23de0b9716
--- /dev/null
+++ b/test/CodeGen/ARM/2011-04-12-FastRegAlloc.ll
@@ -0,0 +1,15 @@
+; RUN: llc < %s -O0 -verify-machineinstrs -regalloc=fast
+; Previously we'd crash as out of registers on this input by clobbering all of
+; the aliases.
+target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:32:64-v128:32:128-a0:0:32-n32"
+target triple = "thumbv7-apple-darwin10.0.0"
+
+define void @_Z8TestCasev() nounwind ssp {
+entry:
+ %a = alloca float, align 4
+ %tmp = load float* %a, align 4
+ call void asm sideeffect "", "w,~{s0},~{s16}"(float %tmp) nounwind, !srcloc !0
+ ret void
+}
+
+!0 = metadata !{i32 109}
diff --git a/test/CodeGen/ARM/2011-04-15-AndVFlagPeepholeBug.ll b/test/CodeGen/ARM/2011-04-15-AndVFlagPeepholeBug.ll
new file mode 100644
index 000000000000..e712e08ddb6a
--- /dev/null
+++ b/test/CodeGen/ARM/2011-04-15-AndVFlagPeepholeBug.ll
@@ -0,0 +1,22 @@
+; RUN: llc < %s -mtriple=thumbv7-apple-darwin10 | FileCheck %s
+
+; CHECK: _f
+; CHECK-NOT: ands
+; CHECK: cmp
+; CHECK: blxle _g
+
+define i32 @f(i32 %a, i32 %b) nounwind ssp {
+entry:
+ %and = and i32 %b, %a
+ %cmp = icmp slt i32 %and, 1
+ br i1 %cmp, label %if.then, label %if.end
+
+if.then: ; preds = %entry
+ tail call void (...)* @g(i32 %a, i32 %b) nounwind
+ br label %if.end
+
+if.end: ; preds = %if.then, %entry
+ ret i32 %and
+}
+
+declare void @g(...)
diff --git a/test/CodeGen/ARM/2011-04-15-RegisterCmpPeephole.ll b/test/CodeGen/ARM/2011-04-15-RegisterCmpPeephole.ll
new file mode 100644
index 000000000000..5404cf57a59f
--- /dev/null
+++ b/test/CodeGen/ARM/2011-04-15-RegisterCmpPeephole.ll
@@ -0,0 +1,41 @@
+; RUN: llc < %s -mtriple=thumbv7-apple-darwin10 | FileCheck %s
+
+; CHECK: _f
+; CHECK: adds
+; CHECK-NOT: cmp
+; CHECK: blxeq _h
+
+define i32 @f(i32 %a, i32 %b) nounwind ssp {
+entry:
+ %add = add nsw i32 %b, %a
+ %cmp = icmp eq i32 %add, 0
+ br i1 %cmp, label %if.then, label %if.end
+
+if.then: ; preds = %entry
+ tail call void (...)* @h(i32 %a, i32 %b) nounwind
+ br label %if.end
+
+if.end: ; preds = %if.then, %entry
+ ret i32 %add
+}
+
+; CHECK: _g
+; CHECK: orrs
+; CHECK-NOT: cmp
+; CHECK: blxeq _h
+
+define i32 @g(i32 %a, i32 %b) nounwind ssp {
+entry:
+ %add = or i32 %b, %a
+ %cmp = icmp eq i32 %add, 0
+ br i1 %cmp, label %if.then, label %if.end
+
+if.then: ; preds = %entry
+ tail call void (...)* @h(i32 %a, i32 %b) nounwind
+ br label %if.end
+
+if.end: ; preds = %if.then, %entry
+ ret i32 %add
+}
+
+declare void @h(...)
diff --git a/test/CodeGen/ARM/2011-04-26-SchedTweak.ll b/test/CodeGen/ARM/2011-04-26-SchedTweak.ll
new file mode 100644
index 000000000000..ed7dd0332046
--- /dev/null
+++ b/test/CodeGen/ARM/2011-04-26-SchedTweak.ll
@@ -0,0 +1,70 @@
+; RUN: llc < %s -mtriple=thumbv7-apple-ios -relocation-model=pic -mcpu=cortex-a8 | FileCheck %s
+
+; Do not move the umull above previous call which would require use of
+; more callee-saved registers and introduce copies.
+; rdar://9329627
+
+%struct.FF = type { i32 (i32*)*, i32 (i32*, i32*, i32, i32, i32, i32)*, i32 (i32, i32, i8*)*, void ()*, i32 (i32, i8*, i32*)*, i32 ()* }
+%struct.BD = type { %struct.BD*, i32, i32, i32, i32, i64, i32 (%struct.BD*, i8*, i64, i32)*, i32 (%struct.BD*, i8*, i32, i32)*, i32 (%struct.BD*, i8*, i64, i32)*, i32 (%struct.BD*, i8*, i32, i32)*, i32 (%struct.BD*, i64, i32)*, [16 x i8], i64, i64 }
+
+@FuncPtr = external hidden unnamed_addr global %struct.FF*
+@.str1 = external hidden unnamed_addr constant [6 x i8], align 4
+@G = external unnamed_addr global i32
+@.str2 = external hidden unnamed_addr constant [58 x i8], align 4
+@.str3 = external hidden unnamed_addr constant [58 x i8], align 4
+
+define i32 @test() nounwind optsize ssp {
+entry:
+; CHECK: test:
+; CHECK: push
+; CHECK-NOT: push
+ %block_size = alloca i32, align 4
+ %block_count = alloca i32, align 4
+ %index_cache = alloca i32, align 4
+ store i32 0, i32* %index_cache, align 4
+ %tmp = load i32* @G, align 4
+ %tmp1 = call i32 @bar(i32 0, i32 0, i32 %tmp) nounwind
+ switch i32 %tmp1, label %bb8 [
+ i32 0, label %bb
+ i32 536870913, label %bb4
+ i32 536870914, label %bb6
+ ]
+
+bb:
+ %tmp2 = load i32* @G, align 4
+ %tmp4 = icmp eq i32 %tmp2, 0
+ br i1 %tmp4, label %bb1, label %bb8
+
+bb1:
+; CHECK: %bb1
+; CHECK-NOT: umull
+; CHECK: blx _Get
+; CHECK: umull
+; CHECK: blx _foo
+ %tmp5 = load i32* %block_size, align 4
+ %tmp6 = load i32* %block_count, align 4
+ %tmp7 = call %struct.FF* @Get() nounwind
+ store %struct.FF* %tmp7, %struct.FF** @FuncPtr, align 4
+ %tmp10 = zext i32 %tmp6 to i64
+ %tmp11 = zext i32 %tmp5 to i64
+ %tmp12 = mul nsw i64 %tmp10, %tmp11
+ %tmp13 = call i32 @foo(i8* getelementptr inbounds ([6 x i8]* @.str1, i32 0, i32 0), i64 %tmp12, i32 %tmp5) nounwind
+ br label %bb8
+
+bb4:
+ ret i32 0
+
+bb6:
+ ret i32 1
+
+bb8:
+ ret i32 -1
+}
+
+declare i32 @printf(i8*, ...)
+
+declare %struct.FF* @Get()
+
+declare i32 @foo(i8*, i64, i32)
+
+declare i32 @bar(i32, i32, i32)
diff --git a/test/CodeGen/ARM/2011-04-27-IfCvtBug.ll b/test/CodeGen/ARM/2011-04-27-IfCvtBug.ll
new file mode 100644
index 000000000000..0741049cffdd
--- /dev/null
+++ b/test/CodeGen/ARM/2011-04-27-IfCvtBug.ll
@@ -0,0 +1,59 @@
+; RUN: llc < %s -mtriple=thumbv7-apple-ios
+
+; If converter was being too cute. It look for root BBs (which don't have
+; successors) and use inverse depth first search to traverse the BBs. However
+; that doesn't work when the CFG has infinite loops. Simply do a linear
+; traversal of all BBs work just fine.
+
+; rdar://9344645
+
+%struct.hc = type { i32, i32, i32, i32 }
+
+define i32 @t(i32 %type) optsize {
+entry:
+ br i1 undef, label %if.then, label %if.else
+
+if.then:
+ unreachable
+
+if.else:
+ br i1 undef, label %if.then15, label %if.else18
+
+if.then15:
+ unreachable
+
+if.else18:
+ switch i32 %type, label %if.else173 [
+ i32 3, label %if.then115
+ i32 1, label %if.then102
+ ]
+
+if.then102:
+ br i1 undef, label %cond.true10.i, label %t.exit
+
+cond.true10.i:
+ br label %t.exit
+
+t.exit:
+ unreachable
+
+if.then115:
+ br i1 undef, label %if.else163, label %if.else145
+
+if.else145:
+ %call150 = call fastcc %struct.hc* @foo(%struct.hc* undef, i32 34865152) optsize
+ br label %while.body172
+
+if.else163:
+ %call168 = call fastcc %struct.hc* @foo(%struct.hc* undef, i32 34078720) optsize
+ br label %while.body172
+
+while.body172:
+ br label %while.body172
+
+if.else173:
+ ret i32 -1
+}
+
+declare hidden fastcc %struct.hc* @foo(%struct.hc* nocapture, i32) nounwind optsize
+
diff --git a/test/CodeGen/ARM/align.ll b/test/CodeGen/ARM/align.ll
index d57c159b85cb..9589e72df2f5 100644
--- a/test/CodeGen/ARM/align.ll
+++ b/test/CodeGen/ARM/align.ll
@@ -1,5 +1,5 @@
; RUN: llc < %s -mtriple=arm-linux-gnueabi | FileCheck %s -check-prefix=ELF
-; RUN: llc < %s -mtriple=arm-apple-darwin | FileCheck %s -check-prefix=DARWIN
+; RUN: llc < %s -mtriple=arm-apple-darwin10 | FileCheck %s -check-prefix=DARWIN
@a = global i1 true
; no alignment
diff --git a/test/CodeGen/ARM/arguments.ll b/test/CodeGen/ARM/arguments.ll
index c7fcb9755d9e..a8b42e63b71f 100644
--- a/test/CodeGen/ARM/arguments.ll
+++ b/test/CodeGen/ARM/arguments.ll
@@ -14,7 +14,7 @@ define i32 @f1(i32 %a, i64 %b) {
define i32 @f2() nounwind optsize {
; ELF: f2:
; ELF: mov [[REGISTER:(r[0-9]+)]], #128
-; ELF: str [[REGISTER]], [sp]
+; ELF: str [[REGISTER]], [
; DARWIN: f2:
; DARWIN: mov r3, #128
entry:
diff --git a/test/CodeGen/ARM/arm-and-tst-peephole.ll b/test/CodeGen/ARM/arm-and-tst-peephole.ll
index 50c638b73931..07620700aedb 100644
--- a/test/CodeGen/ARM/arm-and-tst-peephole.ll
+++ b/test/CodeGen/ARM/arm-and-tst-peephole.ll
@@ -23,15 +23,15 @@ tailrecurse: ; preds = %sw.bb, %entry
%tmp2 = load i8** %scevgep5
%0 = ptrtoint i8* %tmp2 to i32
-; ARM: ands r12, r12, #3
+; ARM: ands {{r[0-9]+}}, {{r[0-9]+}}, #3
; ARM-NEXT: beq
-; THUMB: movs r5, #3
-; THUMB-NEXT: ands r5, r4
-; THUMB-NEXT: cmp r5, #0
+; THUMB: movs r[[R0:[0-9]+]], #3
+; THUMB-NEXT: ands r[[R0]], r
+; THUMB-NEXT: cmp r[[R0]], #0
; THUMB-NEXT: beq
-; T2: ands r12, r12, #3
+; T2: ands {{r[0-9]+}}, {{r[0-9]+}}, #3
; T2-NEXT: beq
%and = and i32 %0, 3
diff --git a/test/CodeGen/ARM/arm-returnaddr.ll b/test/CodeGen/ARM/arm-returnaddr.ll
index 382a18334600..95edaad47e5f 100644
--- a/test/CodeGen/ARM/arm-returnaddr.ll
+++ b/test/CodeGen/ARM/arm-returnaddr.ll
@@ -1,5 +1,7 @@
; RUN: llc < %s -mtriple=arm-apple-darwin | FileCheck %s
; RUN: llc < %s -mtriple=thumbv6-apple-darwin | FileCheck %s
+; RUN: llc < %s -mtriple=arm-apple-darwin -regalloc=basic | FileCheck %s
+; RUN: llc < %s -mtriple=thumbv6-apple-darwin -regalloc=basic | FileCheck %s
; rdar://8015977
; rdar://8020118
@@ -16,7 +18,7 @@ define i8* @rt2() nounwind readnone {
entry:
; CHECK: rt2:
; CHECK: {r7, lr}
-; CHECK: ldr r0, [r7]
+; CHECK: ldr r[[R0:[0-9]+]], [r7]
; CHECK: ldr r0, [r0]
; CHECK: ldr r0, [r0, #4]
%0 = tail call i8* @llvm.returnaddress(i32 2)
diff --git a/test/CodeGen/ARM/avoid-cpsr-rmw.ll b/test/CodeGen/ARM/avoid-cpsr-rmw.ll
new file mode 100644
index 000000000000..d0c4f3ae9d67
--- /dev/null
+++ b/test/CodeGen/ARM/avoid-cpsr-rmw.ll
@@ -0,0 +1,16 @@
+; RUN: llc < %s -mtriple=thumbv7-apple-darwin -mcpu=cortex-a9 | FileCheck %s
+; Avoid some 's' 16-bit instruction which partially update CPSR (and add false
+; dependency) when it isn't dependent on last CPSR defining instruction.
+; rdar://8928208
+
+define i32 @t(i32 %a, i32 %b, i32 %c, i32 %d) nounwind readnone {
+ entry:
+; CHECK: t:
+; CHECK: muls r2, r3, r2
+; CHECK-NEXT: mul r0, r0, r1
+; CHECK-NEXT: muls r0, r2, r0
+ %0 = mul nsw i32 %a, %b
+ %1 = mul nsw i32 %c, %d
+ %2 = mul nsw i32 %0, %1
+ ret i32 %2
+}
diff --git a/test/CodeGen/ARM/bx_fold.ll b/test/CodeGen/ARM/bx_fold.ll
index 09f1aae0a9f0..5533038fb828 100644
--- a/test/CodeGen/ARM/bx_fold.ll
+++ b/test/CodeGen/ARM/bx_fold.ll
@@ -24,7 +24,7 @@ bb1: ; preds = %bb, %entry
bb18: ; preds = %bb1
; CHECK-NOT: bx
-; CHECK: ldmia sp!
+; CHECK: pop
ret void
}
diff --git a/test/CodeGen/ARM/call-tc.ll b/test/CodeGen/ARM/call-tc.ll
index a77aba037be5..4dc37aa27558 100644
--- a/test/CodeGen/ARM/call-tc.ll
+++ b/test/CodeGen/ARM/call-tc.ll
@@ -74,7 +74,7 @@ entry:
; CHECKT2: t7:
; CHECKT2: blxeq _foo
; CHECKT2-NEXT: pop.w
-; CHECKT2-NEXT: b.w _foo
+; CHECKT2-NEXT: b _foo
br i1 undef, label %bb, label %bb1.lr.ph
bb1.lr.ph:
diff --git a/test/CodeGen/ARM/carry.ll b/test/CodeGen/ARM/carry.ll
index a6a7ed6af184..9b90408cc4db 100644
--- a/test/CodeGen/ARM/carry.ll
+++ b/test/CodeGen/ARM/carry.ll
@@ -19,3 +19,20 @@ entry:
%tmp2 = sub i64 %tmp1, %b
ret i64 %tmp2
}
+
+; add with live carry
+define i64 @f3(i32 %al, i32 %bl) {
+; CHECK: f3:
+; CHECK: adds r
+; CHECK: adcs r
+; CHECK: adc r
+entry:
+ ; unsigned wide add
+ %aw = zext i32 %al to i64
+ %bw = zext i32 %bl to i64
+ %cw = add i64 %aw, %bw
+ ; ch == carry bit
+ %ch = lshr i64 %cw, 32
+ %dw = add i64 %ch, %bw
+ ret i64 %dw
+}
diff --git a/test/CodeGen/ARM/code-placement.ll b/test/CodeGen/ARM/code-placement.ll
index 845be8c20ea5..91ef65925221 100644
--- a/test/CodeGen/ARM/code-placement.ll
+++ b/test/CodeGen/ARM/code-placement.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -mtriple=armv7-apple-darwin -cgp-critical-edge-splitting=0 | FileCheck %s
+; RUN: llc < %s -mtriple=armv7-apple-darwin | FileCheck %s
; PHI elimination shouldn't break backedge.
; rdar://8263994
@@ -72,7 +72,7 @@ bb2.preheader: ; preds = %bb3, %bb.nph15
br i1 %4, label %bb1, label %bb3
; CHECK: LBB1_[[RET]]: @ %bb5
-; CHECK: ldmia sp!
+; CHECK: pop
bb5: ; preds = %bb3, %entry
%sum.1.lcssa = phi i32 [ 0, %entry ], [ %sum.0.lcssa, %bb3 ] ; <i32> [#uses=1]
ret i32 %sum.1.lcssa
diff --git a/test/CodeGen/ARM/constants.ll b/test/CodeGen/ARM/constants.ll
index 542cf02f2a90..7893df782054 100644
--- a/test/CodeGen/ARM/constants.ll
+++ b/test/CodeGen/ARM/constants.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -march=arm | FileCheck %s
+; RUN: llc < %s -march=arm -disable-cgp-branch-opts | FileCheck %s
define i32 @f1() {
; CHECK: f1
@@ -14,31 +14,31 @@ define i32 @f2() {
define i32 @f3() {
; CHECK: f3
-; CHECK: mov r0, #1, 24
+; CHECK: mov r0, #1, #24
ret i32 256
}
define i32 @f4() {
; CHECK: f4
-; CHECK: orr{{.*}}#1, 24
+; CHECK: orr{{.*}}#1, #24
ret i32 257
}
define i32 @f5() {
; CHECK: f5
-; CHECK: mov r0, #255, 2
+; CHECK: mov r0, #255, #2
ret i32 -1073741761
}
define i32 @f6() {
; CHECK: f6
-; CHECK: mov r0, #63, 28
+; CHECK: mov r0, #63, #28
ret i32 1008
}
define void @f7(i32 %a) {
; CHECK: f7
-; CHECK: cmp r0, #1, 16
+; CHECK: cmp r0, #1, #16
%b = icmp ugt i32 %a, 65536
br i1 %b, label %r, label %r
r:
diff --git a/test/CodeGen/ARM/crash-greedy.ll b/test/CodeGen/ARM/crash-greedy.ll
new file mode 100644
index 000000000000..8a865e23d0a4
--- /dev/null
+++ b/test/CodeGen/ARM/crash-greedy.ll
@@ -0,0 +1,84 @@
+; RUN: llc < %s -regalloc=greedy -mcpu=cortex-a8 -relocation-model=pic -disable-fp-elim -verify-machineinstrs | FileCheck %s
+;
+; ARM tests that crash or fail with the greedy register allocator.
+
+target triple = "thumbv7-apple-darwin"
+
+declare double @exp(double)
+
+; CHECK: remat_subreg
+define void @remat_subreg(float* nocapture %x, i32* %y, i32 %n, i32 %z, float %c, float %lambda, float* nocapture %ret_f, float* nocapture %ret_df) nounwind {
+entry:
+ %conv16 = fpext float %lambda to double
+ %mul17 = fmul double %conv16, -1.000000e+00
+ br i1 undef, label %cond.end.us, label %cond.end
+
+cond.end.us: ; preds = %entry
+ unreachable
+
+cond.end: ; preds = %cond.end, %entry
+ %mul = fmul double undef, 0.000000e+00
+ %add = fadd double undef, %mul
+ %add46 = fadd double undef, undef
+ %add75 = fadd double 0.000000e+00, undef
+ br i1 undef, label %for.end, label %cond.end
+
+for.end: ; preds = %cond.end
+ %conv78 = sitofp i32 %z to double
+ %conv83 = fpext float %c to double
+ %mul84 = fmul double %mul17, %conv83
+ %call85 = tail call double @exp(double %mul84) nounwind
+ %mul86 = fmul double %conv78, %call85
+ %add88 = fadd double 0.000000e+00, %mul86
+; CHECK: blx _exp
+ %call100 = tail call double @exp(double %mul84) nounwind
+ %mul101 = fmul double undef, %call100
+ %add103 = fadd double %add46, %mul101
+ %mul111 = fmul double undef, %conv83
+ %mul119 = fmul double %mul111, undef
+ %add121 = fadd double undef, %mul119
+ %div = fdiv double 1.000000e+00, %conv16
+ %div126 = fdiv double %add, %add75
+ %sub = fsub double %div, %div126
+ %div129 = fdiv double %add103, %add88
+ %add130 = fadd double %sub, %div129
+ %conv131 = fptrunc double %add130 to float
+ store float %conv131, float* %ret_f, align 4
+ %mul139 = fmul double %div129, %div129
+ %div142 = fdiv double %add121, %add88
+ %sub143 = fsub double %mul139, %div142
+; %lambda is passed on the stack, and the stack slot load is rematerialized.
+; The rematted load of a float constrains the D register used for the mul.
+; CHECK: vldr
+ %mul146 = fmul float %lambda, %lambda
+ %conv147 = fpext float %mul146 to double
+ %div148 = fdiv double 1.000000e+00, %conv147
+ %sub149 = fsub double %sub143, %div148
+ %conv150 = fptrunc double %sub149 to float
+ store float %conv150, float* %ret_df, align 4
+ ret void
+}
+
+; CHECK: insert_elem
+; This test has a sub-register copy with a kill flag:
+; %vreg6:ssub_3<def> = COPY %vreg6:ssub_2<kill>; QPR_VFP2:%vreg6
+; The rewriter must do something sensible with that, or the scavenger crashes.
+define void @insert_elem() nounwind {
+entry:
+ br i1 undef, label %if.end251, label %if.then84
+
+if.then84: ; preds = %entry
+ br i1 undef, label %if.end251, label %if.then195
+
+if.then195: ; preds = %if.then84
+ %div = fdiv float 1.000000e+00, undef
+ %vecinit207 = insertelement <4 x float> undef, float %div, i32 1
+ %vecinit208 = insertelement <4 x float> %vecinit207, float 1.000000e+00, i32 2
+ %vecinit209 = insertelement <4 x float> %vecinit208, float 1.000000e+00, i32 3
+ %mul216 = fmul <4 x float> zeroinitializer, %vecinit209
+ store <4 x float> %mul216, <4 x float>* undef, align 16
+ br label %if.end251
+
+if.end251: ; preds = %if.then195, %if.then84, %entry
+ ret void
+}
diff --git a/test/CodeGen/ARM/debug-info-d16-reg.ll b/test/CodeGen/ARM/debug-info-d16-reg.ll
new file mode 100644
index 000000000000..8c9095e3a9ea
--- /dev/null
+++ b/test/CodeGen/ARM/debug-info-d16-reg.ll
@@ -0,0 +1,105 @@
+; RUN: llc < %s - | FileCheck %s
+; Radar 9309221
+; Test dwarf reg no for d16
+;CHECK: DW_OP_regx
+;CHECK-NEXT: 272
+
+target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:32:64-v128:32:128-a0:0:32-n32"
+target triple = "thumbv7-apple-darwin10"
+
+@.str = private unnamed_addr constant [11 x i8] c"%p %lf %c\0A\00", align 4
+@.str1 = private unnamed_addr constant [6 x i8] c"point\00", align 4
+
+define i32 @inlineprinter(i8* %ptr, double %val, i8 zeroext %c) nounwind optsize {
+entry:
+ tail call void @llvm.dbg.value(metadata !{i8* %ptr}, i64 0, metadata !19), !dbg !26
+ tail call void @llvm.dbg.value(metadata !{double %val}, i64 0, metadata !20), !dbg !26
+ tail call void @llvm.dbg.value(metadata !{i8 %c}, i64 0, metadata !21), !dbg !26
+ %0 = zext i8 %c to i32, !dbg !27
+ %1 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([11 x i8]* @.str, i32 0, i32 0), i8* %ptr, double %val, i32 %0) nounwind, !dbg !27
+ ret i32 0, !dbg !29
+}
+
+define i32 @printer(i8* %ptr, double %val, i8 zeroext %c) nounwind optsize noinline {
+entry:
+ tail call void @llvm.dbg.value(metadata !{i8* %ptr}, i64 0, metadata !16), !dbg !30
+ tail call void @llvm.dbg.value(metadata !{double %val}, i64 0, metadata !17), !dbg !30
+ tail call void @llvm.dbg.value(metadata !{i8 %c}, i64 0, metadata !18), !dbg !30
+ %0 = zext i8 %c to i32, !dbg !31
+ %1 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([11 x i8]* @.str, i32 0, i32 0), i8* %ptr, double %val, i32 %0) nounwind, !dbg !31
+ ret i32 0, !dbg !33
+}
+
+declare i32 @printf(i8* nocapture, ...) nounwind
+
+declare void @llvm.dbg.value(metadata, i64, metadata) nounwind readnone
+
+define i32 @main(i32 %argc, i8** nocapture %argv) nounwind optsize {
+entry:
+ tail call void @llvm.dbg.value(metadata !{i32 %argc}, i64 0, metadata !22), !dbg !34
+ tail call void @llvm.dbg.value(metadata !{i8** %argv}, i64 0, metadata !23), !dbg !34
+ %0 = sitofp i32 %argc to double, !dbg !35
+ %1 = fadd double %0, 5.555552e+05, !dbg !35
+ tail call void @llvm.dbg.value(metadata !{double %1}, i64 0, metadata !24), !dbg !35
+ %2 = tail call i32 @puts(i8* getelementptr inbounds ([6 x i8]* @.str1, i32 0, i32 0)) nounwind, !dbg !36
+ %3 = getelementptr inbounds i8* bitcast (i32 (i32, i8**)* @main to i8*), i32 %argc, !dbg !37
+ %4 = trunc i32 %argc to i8, !dbg !37
+ %5 = add i8 %4, 97, !dbg !37
+ tail call void @llvm.dbg.value(metadata !{i8* %3}, i64 0, metadata !19) nounwind, !dbg !38
+ tail call void @llvm.dbg.value(metadata !{double %1}, i64 0, metadata !20) nounwind, !dbg !38
+ tail call void @llvm.dbg.value(metadata !{i8 %5}, i64 0, metadata !21) nounwind, !dbg !38
+ %6 = zext i8 %5 to i32, !dbg !39
+ %7 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([11 x i8]* @.str, i32 0, i32 0), i8* %3, double %1, i32 %6) nounwind, !dbg !39
+ %8 = tail call i32 @printer(i8* %3, double %1, i8 zeroext %5) nounwind, !dbg !40
+ ret i32 0, !dbg !41
+}
+
+declare i32 @puts(i8* nocapture) nounwind
+
+!llvm.dbg.sp = !{!0, !9, !10}
+!llvm.dbg.lv.printer = !{!16, !17, !18}
+!llvm.dbg.lv.inlineprinter = !{!19, !20, !21}
+!llvm.dbg.lv.main = !{!22, !23, !24}
+
+!0 = metadata !{i32 589870, i32 0, metadata !1, metadata !"printer", metadata !"printer", metadata !"printer", metadata !1, i32 12, metadata !3, i1 false, i1 true, i32 0, i32 0, null, i32 256, i1 true, i32 (i8*, double, i8)* @printer} ; [ DW_TAG_subprogram ]
+!1 = metadata !{i32 589865, metadata !"a.c", metadata !"/tmp/", metadata !2} ; [ DW_TAG_file_type ]
+!2 = metadata !{i32 589841, i32 0, i32 1, metadata !"/tmp/a.c", metadata !"/tmp", metadata !"(LLVM build 00)", i1 true, i1 true, metadata !"", i32 0} ; [ DW_TAG_compile_unit ]
+!3 = metadata !{i32 589845, metadata !1, metadata !"", metadata !1, i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !4, i32 0, null} ; [ DW_TAG_subroutine_type ]
+!4 = metadata !{metadata !5, metadata !6, metadata !7, metadata !8}
+!5 = metadata !{i32 589860, metadata !1, metadata !"int", metadata !1, i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ]
+!6 = metadata !{i32 589839, metadata !1, metadata !"", metadata !1, i32 0, i64 32, i64 32, i64 0, i32 0, null} ; [ DW_TAG_pointer_type ]
+!7 = metadata !{i32 589860, metadata !1, metadata !"double", metadata !1, i32 0, i64 64, i64 32, i64 0, i32 0, i32 4} ; [ DW_TAG_base_type ]
+!8 = metadata !{i32 589860, metadata !1, metadata !"unsigned char", metadata !1, i32 0, i64 8, i64 8, i64 0, i32 0, i32 8} ; [ DW_TAG_base_type ]
+!9 = metadata !{i32 589870, i32 0, metadata !1, metadata !"inlineprinter", metadata !"inlineprinter", metadata !"inlineprinter", metadata !1, i32 5, metadata !3, i1 false, i1 true, i32 0, i32 0, null, i32 256, i1 true, i32 (i8*, double, i8)* @inlineprinter} ; [ DW_TAG_subprogram ]
+!10 = metadata !{i32 589870, i32 0, metadata !1, metadata !"main", metadata !"main", metadata !"main", metadata !1, i32 18, metadata !11, i1 false, i1 true, i32 0, i32 0, null, i32 256, i1 true, i32 (i32, i8**)* @main} ; [ DW_TAG_subprogram ]
+!11 = metadata !{i32 589845, metadata !1, metadata !"", metadata !1, i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !12, i32 0, null} ; [ DW_TAG_subroutine_type ]
+!12 = metadata !{metadata !5, metadata !5, metadata !13}
+!13 = metadata !{i32 589839, metadata !1, metadata !"", metadata !1, i32 0, i64 32, i64 32, i64 0, i32 0, metadata !14} ; [ DW_TAG_pointer_type ]
+!14 = metadata !{i32 589839, metadata !1, metadata !"", metadata !1, i32 0, i64 32, i64 32, i64 0, i32 0, metadata !15} ; [ DW_TAG_pointer_type ]
+!15 = metadata !{i32 589860, metadata !1, metadata !"char", metadata !1, i32 0, i64 8, i64 8, i64 0, i32 0, i32 6} ; [ DW_TAG_base_type ]
+!16 = metadata !{i32 590081, metadata !0, metadata !"ptr", metadata !1, i32 11, metadata !6, i32 0} ; [ DW_TAG_arg_variable ]
+!17 = metadata !{i32 590081, metadata !0, metadata !"val", metadata !1, i32 11, metadata !7, i32 0} ; [ DW_TAG_arg_variable ]
+!18 = metadata !{i32 590081, metadata !0, metadata !"c", metadata !1, i32 11, metadata !8, i32 0} ; [ DW_TAG_arg_variable ]
+!19 = metadata !{i32 590081, metadata !9, metadata !"ptr", metadata !1, i32 4, metadata !6, i32 0} ; [ DW_TAG_arg_variable ]
+!20 = metadata !{i32 590081, metadata !9, metadata !"val", metadata !1, i32 4, metadata !7, i32 0} ; [ DW_TAG_arg_variable ]
+!21 = metadata !{i32 590081, metadata !9, metadata !"c", metadata !1, i32 4, metadata !8, i32 0} ; [ DW_TAG_arg_variable ]
+!22 = metadata !{i32 590081, metadata !10, metadata !"argc", metadata !1, i32 17, metadata !5, i32 0} ; [ DW_TAG_arg_variable ]
+!23 = metadata !{i32 590081, metadata !10, metadata !"argv", metadata !1, i32 17, metadata !13, i32 0} ; [ DW_TAG_arg_variable ]
+!24 = metadata !{i32 590080, metadata !25, metadata !"dval", metadata !1, i32 19, metadata !7, i32 0} ; [ DW_TAG_auto_variable ]
+!25 = metadata !{i32 589835, metadata !10, i32 18, i32 0, metadata !1, i32 2} ; [ DW_TAG_lexical_block ]
+!26 = metadata !{i32 4, i32 0, metadata !9, null}
+!27 = metadata !{i32 6, i32 0, metadata !28, null}
+!28 = metadata !{i32 589835, metadata !9, i32 5, i32 0, metadata !1, i32 1} ; [ DW_TAG_lexical_block ]
+!29 = metadata !{i32 7, i32 0, metadata !28, null}
+!30 = metadata !{i32 11, i32 0, metadata !0, null}
+!31 = metadata !{i32 13, i32 0, metadata !32, null}
+!32 = metadata !{i32 589835, metadata !0, i32 12, i32 0, metadata !1, i32 0} ; [ DW_TAG_lexical_block ]
+!33 = metadata !{i32 14, i32 0, metadata !32, null}
+!34 = metadata !{i32 17, i32 0, metadata !10, null}
+!35 = metadata !{i32 19, i32 0, metadata !25, null}
+!36 = metadata !{i32 20, i32 0, metadata !25, null}
+!37 = metadata !{i32 21, i32 0, metadata !25, null}
+!38 = metadata !{i32 4, i32 0, metadata !9, metadata !37}
+!39 = metadata !{i32 6, i32 0, metadata !28, metadata !37}
+!40 = metadata !{i32 22, i32 0, metadata !25, null}
+!41 = metadata !{i32 23, i32 0, metadata !25, null}
diff --git a/test/CodeGen/ARM/debug-info-qreg.ll b/test/CodeGen/ARM/debug-info-qreg.ll
new file mode 100644
index 000000000000..e83a83d1f10a
--- /dev/null
+++ b/test/CodeGen/ARM/debug-info-qreg.ll
@@ -0,0 +1,94 @@
+; RUN: llc < %s - | FileCheck %s
+target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:32:64-v128:32:128-a0:0:32-n32"
+target triple = "thumbv7-apple-macosx10.6.7"
+
+;CHECK: DW_OP_regx for Q register: D1
+;CHECK-NEXT: byte
+;CHECK-NEXT: byte
+;CHECK-NEXT: DW_OP_piece 8
+;CHECK-NEXT: byte 8
+;CHECK-NEXT: DW_OP_regx for Q register: D2
+;CHECK-NEXT: byte
+;CHECK-NEXT: byte
+;CHECK-NEXT: DW_OP_piece 8
+;CHECK-NEXT: byte 8
+
+@.str = external constant [13 x i8]
+
+declare <4 x float> @test0001(float) nounwind readnone ssp
+
+define i32 @main(i32 %argc, i8** nocapture %argv) nounwind ssp {
+entry:
+ br label %for.body9
+
+for.body9: ; preds = %for.body9, %entry
+ %add19 = fadd <4 x float> undef, <float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 1.000000e+00>, !dbg !39
+ br i1 undef, label %for.end54, label %for.body9, !dbg !44
+
+for.end54: ; preds = %for.body9
+ tail call void @llvm.dbg.value(metadata !{<4 x float> %add19}, i64 0, metadata !27), !dbg !39
+ %tmp115 = extractelement <4 x float> %add19, i32 1
+ %conv6.i75 = fpext float %tmp115 to double, !dbg !45
+ %call.i82 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([13 x i8]* @.str, i32 0, i32 0), double undef, double %conv6.i75, double undef, double undef) nounwind, !dbg !45
+ ret i32 0, !dbg !49
+}
+
+declare i32 @printf(i8* nocapture, ...) nounwind
+
+declare void @llvm.dbg.value(metadata, i64, metadata) nounwind readnone
+
+!llvm.dbg.sp = !{!0, !10, !14}
+!llvm.dbg.lv.test0001 = !{!18}
+!llvm.dbg.lv.main = !{!19, !20, !24, !26, !27, !28, !29}
+!llvm.dbg.lv.printFV = !{!30}
+
+!0 = metadata !{i32 589870, i32 0, metadata !1, metadata !"test0001", metadata !"test0001", metadata !"", metadata !1, i32 3, metadata !3, i1 false, i1 true, i32 0, i32 0, i32 0, i32 256, i1 true, <4 x float> (float)* @test0001, null} ; [ DW_TAG_subprogram ]
+!1 = metadata !{i32 589865, metadata !"build2.c", metadata !"/private/tmp", metadata !2} ; [ DW_TAG_file_type ]
+!2 = metadata !{i32 589841, i32 0, i32 12, metadata !"build2.c", metadata !"/private/tmp", metadata !"clang version 3.0 (trunk 129915)", i1 true, i1 true, metadata !"", i32 0} ; [ DW_TAG_compile_unit ]
+!3 = metadata !{i32 589845, metadata !1, metadata !"", metadata !1, i32 0, i64 0, i64 0, i32 0, i32 0, i32 0, metadata !4, i32 0, i32 0} ; [ DW_TAG_subroutine_type ]
+!4 = metadata !{metadata !5}
+!5 = metadata !{i32 589846, metadata !2, metadata !"v4f32", metadata !1, i32 14, i64 0, i64 0, i64 0, i32 0, metadata !6} ; [ DW_TAG_typedef ]
+!6 = metadata !{i32 590083, metadata !2, metadata !"", metadata !2, i32 0, i64 128, i64 128, i32 0, i32 0, metadata !7, metadata !8, i32 0, i32 0} ; [ DW_TAG_vector_type ]
+!7 = metadata !{i32 589860, metadata !2, metadata !"float", null, i32 0, i64 32, i64 32, i64 0, i32 0, i32 4} ; [ DW_TAG_base_type ]
+!8 = metadata !{metadata !9}
+!9 = metadata !{i32 589857, i64 0, i64 3} ; [ DW_TAG_subrange_type ]
+!10 = metadata !{i32 589870, i32 0, metadata !1, metadata !"main", metadata !"main", metadata !"", metadata !1, i32 59, metadata !11, i1 false, i1 true, i32 0, i32 0, i32 0, i32 256, i1 true, i32 (i32, i8**)* @main, null} ; [ DW_TAG_subprogram ]
+!11 = metadata !{i32 589845, metadata !1, metadata !"", metadata !1, i32 0, i64 0, i64 0, i32 0, i32 0, i32 0, metadata !12, i32 0, i32 0} ; [ DW_TAG_subroutine_type ]
+!12 = metadata !{metadata !13}
+!13 = metadata !{i32 589860, metadata !2, metadata !"int", null, i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ]
+!14 = metadata !{i32 589870, i32 0, metadata !15, metadata !"printFV", metadata !"printFV", metadata !"", metadata !15, i32 41, metadata !16, i1 true, i1 true, i32 0, i32 0, i32 0, i32 256, i1 true, null, null} ; [ DW_TAG_subprogram ]
+!15 = metadata !{i32 589865, metadata !"/Volumes/Lalgate/work/llvm/projects/llvm-test/SingleSource/UnitTests/Vector/helpers.h", metadata !"/private/tmp", metadata !2} ; [ DW_TAG_file_type ]
+!16 = metadata !{i32 589845, metadata !15, metadata !"", metadata !15, i32 0, i64 0, i64 0, i32 0, i32 0, i32 0, metadata !17, i32 0, i32 0} ; [ DW_TAG_subroutine_type ]
+!17 = metadata !{null}
+!18 = metadata !{i32 590081, metadata !0, metadata !"a", metadata !1, i32 16777219, metadata !7, i32 0} ; [ DW_TAG_arg_variable ]
+!19 = metadata !{i32 590081, metadata !10, metadata !"argc", metadata !1, i32 16777275, metadata !13, i32 0} ; [ DW_TAG_arg_variable ]
+!20 = metadata !{i32 590081, metadata !10, metadata !"argv", metadata !1, i32 33554491, metadata !21, i32 0} ; [ DW_TAG_arg_variable ]
+!21 = metadata !{i32 589839, metadata !2, metadata !"", null, i32 0, i64 32, i64 32, i64 0, i32 0, metadata !22} ; [ DW_TAG_pointer_type ]
+!22 = metadata !{i32 589839, metadata !2, metadata !"", null, i32 0, i64 32, i64 32, i64 0, i32 0, metadata !23} ; [ DW_TAG_pointer_type ]
+!23 = metadata !{i32 589860, metadata !2, metadata !"char", null, i32 0, i64 8, i64 8, i64 0, i32 0, i32 6} ; [ DW_TAG_base_type ]
+!24 = metadata !{i32 590080, metadata !25, metadata !"i", metadata !1, i32 60, metadata !13, i32 0} ; [ DW_TAG_auto_variable ]
+!25 = metadata !{i32 589835, metadata !10, i32 59, i32 33, metadata !1, i32 14} ; [ DW_TAG_lexical_block ]
+!26 = metadata !{i32 590080, metadata !25, metadata !"j", metadata !1, i32 60, metadata !13, i32 0} ; [ DW_TAG_auto_variable ]
+!27 = metadata !{i32 590080, metadata !25, metadata !"x", metadata !1, i32 61, metadata !5, i32 0} ; [ DW_TAG_auto_variable ]
+!28 = metadata !{i32 590080, metadata !25, metadata !"y", metadata !1, i32 62, metadata !5, i32 0} ; [ DW_TAG_auto_variable ]
+!29 = metadata !{i32 590080, metadata !25, metadata !"z", metadata !1, i32 63, metadata !5, i32 0} ; [ DW_TAG_auto_variable ]
+!30 = metadata !{i32 590081, metadata !14, metadata !"F", metadata !15, i32 16777257, metadata !31, i32 0} ; [ DW_TAG_arg_variable ]
+!31 = metadata !{i32 589839, metadata !2, metadata !"", null, i32 0, i64 32, i64 32, i64 0, i32 0, metadata !32} ; [ DW_TAG_pointer_type ]
+!32 = metadata !{i32 589846, metadata !2, metadata !"FV", metadata !15, i32 25, i64 0, i64 0, i64 0, i32 0, metadata !33} ; [ DW_TAG_typedef ]
+!33 = metadata !{i32 589847, metadata !2, metadata !"", metadata !15, i32 22, i64 128, i64 128, i64 0, i32 0, i32 0, metadata !34, i32 0, i32 0} ; [ DW_TAG_union_type ]
+!34 = metadata !{metadata !35, metadata !37}
+!35 = metadata !{i32 589837, metadata !15, metadata !"V", metadata !15, i32 23, i64 128, i64 128, i64 0, i32 0, metadata !36} ; [ DW_TAG_member ]
+!36 = metadata !{i32 589846, metadata !2, metadata !"v4sf", metadata !15, i32 3, i64 0, i64 0, i64 0, i32 0, metadata !6} ; [ DW_TAG_typedef ]
+!37 = metadata !{i32 589837, metadata !15, metadata !"A", metadata !15, i32 24, i64 128, i64 32, i64 0, i32 0, metadata !38} ; [ DW_TAG_member ]
+!38 = metadata !{i32 589825, metadata !2, metadata !"", metadata !2, i32 0, i64 128, i64 32, i32 0, i32 0, metadata !7, metadata !8, i32 0, i32 0} ; [ DW_TAG_array_type ]
+!39 = metadata !{i32 79, i32 7, metadata !40, null}
+!40 = metadata !{i32 589835, metadata !41, i32 75, i32 35, metadata !1, i32 18} ; [ DW_TAG_lexical_block ]
+!41 = metadata !{i32 589835, metadata !42, i32 75, i32 5, metadata !1, i32 17} ; [ DW_TAG_lexical_block ]
+!42 = metadata !{i32 589835, metadata !43, i32 71, i32 32, metadata !1, i32 16} ; [ DW_TAG_lexical_block ]
+!43 = metadata !{i32 589835, metadata !25, i32 71, i32 3, metadata !1, i32 15} ; [ DW_TAG_lexical_block ]
+!44 = metadata !{i32 75, i32 5, metadata !42, null}
+!45 = metadata !{i32 42, i32 2, metadata !46, metadata !48}
+!46 = metadata !{i32 589835, metadata !47, i32 42, i32 2, metadata !15, i32 20} ; [ DW_TAG_lexical_block ]
+!47 = metadata !{i32 589835, metadata !14, i32 41, i32 28, metadata !15, i32 19} ; [ DW_TAG_lexical_block ]
+!48 = metadata !{i32 95, i32 3, metadata !25, null}
+!49 = metadata !{i32 99, i32 3, metadata !25, null}
diff --git a/test/CodeGen/ARM/debug-info-s16-reg.ll b/test/CodeGen/ARM/debug-info-s16-reg.ll
new file mode 100644
index 000000000000..548c9bdebf02
--- /dev/null
+++ b/test/CodeGen/ARM/debug-info-s16-reg.ll
@@ -0,0 +1,116 @@
+; RUN: llc < %s - | FileCheck %s
+; Radar 9309221
+; Test dwarf reg no for s16
+;CHECK: DW_OP_regx for S register
+;CHECK-NEXT: byte
+;CHECK-NEXT: byte
+;CHECK-NEXT: DW_OP_bit_piece 32 0
+
+target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:32:64-v128:32:128-a0:0:32-n32"
+target triple = "thumbv7-apple-macosx10.6.7"
+
+@.str = private unnamed_addr constant [11 x i8] c"%p %lf %c\0A\00"
+@.str1 = private unnamed_addr constant [6 x i8] c"point\00"
+
+define i32 @inlineprinter(i8* %ptr, float %val, i8 zeroext %c) nounwind optsize ssp {
+entry:
+ tail call void @llvm.dbg.value(metadata !{i8* %ptr}, i64 0, metadata !8), !dbg !24
+ tail call void @llvm.dbg.value(metadata !{float %val}, i64 0, metadata !10), !dbg !25
+ tail call void @llvm.dbg.value(metadata !{i8 %c}, i64 0, metadata !12), !dbg !26
+ %conv = fpext float %val to double, !dbg !27
+ %conv3 = zext i8 %c to i32, !dbg !27
+ %call = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([11 x i8]* @.str, i32 0, i32 0), i8* %ptr, double %conv, i32 %conv3) nounwind optsize, !dbg !27
+ ret i32 0, !dbg !29
+}
+
+declare i32 @printf(i8* nocapture, ...) nounwind optsize
+
+define i32 @printer(i8* %ptr, float %val, i8 zeroext %c) nounwind optsize noinline ssp {
+entry:
+ tail call void @llvm.dbg.value(metadata !{i8* %ptr}, i64 0, metadata !14), !dbg !30
+ tail call void @llvm.dbg.value(metadata !{float %val}, i64 0, metadata !15), !dbg !31
+ tail call void @llvm.dbg.value(metadata !{i8 %c}, i64 0, metadata !16), !dbg !32
+ %conv = fpext float %val to double, !dbg !33
+ %conv3 = zext i8 %c to i32, !dbg !33
+ %call = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([11 x i8]* @.str, i32 0, i32 0), i8* %ptr, double %conv, i32 %conv3) nounwind optsize, !dbg !33
+ ret i32 0, !dbg !35
+}
+
+define i32 @main(i32 %argc, i8** nocapture %argv) nounwind optsize ssp {
+entry:
+ tail call void @llvm.dbg.value(metadata !{i32 %argc}, i64 0, metadata !17), !dbg !36
+ tail call void @llvm.dbg.value(metadata !{i8** %argv}, i64 0, metadata !18), !dbg !37
+ %conv = sitofp i32 %argc to double, !dbg !38
+ %add = fadd double %conv, 5.555552e+05, !dbg !38
+ %conv1 = fptrunc double %add to float, !dbg !38
+ tail call void @llvm.dbg.value(metadata !{float %conv1}, i64 0, metadata !22), !dbg !38
+ %call = tail call i32 @puts(i8* getelementptr inbounds ([6 x i8]* @.str1, i32 0, i32 0)) nounwind optsize, !dbg !39
+ %add.ptr = getelementptr i8* bitcast (i32 (i32, i8**)* @main to i8*), i32 %argc, !dbg !40
+ %add5 = add nsw i32 %argc, 97, !dbg !40
+ %conv6 = trunc i32 %add5 to i8, !dbg !40
+ tail call void @llvm.dbg.value(metadata !{i8* %add.ptr}, i64 0, metadata !8) nounwind, !dbg !41
+ tail call void @llvm.dbg.value(metadata !{float %conv1}, i64 0, metadata !10) nounwind, !dbg !42
+ tail call void @llvm.dbg.value(metadata !{i8 %conv6}, i64 0, metadata !12) nounwind, !dbg !43
+ %conv.i = fpext float %conv1 to double, !dbg !44
+ %conv3.i = and i32 %add5, 255, !dbg !44
+ %call.i = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([11 x i8]* @.str, i32 0, i32 0), i8* %add.ptr, double %conv.i, i32 %conv3.i) nounwind optsize, !dbg !44
+ %call14 = tail call i32 @printer(i8* %add.ptr, float %conv1, i8 zeroext %conv6) optsize, !dbg !45
+ ret i32 0, !dbg !46
+}
+
+declare i32 @puts(i8* nocapture) nounwind optsize
+
+declare void @llvm.dbg.value(metadata, i64, metadata) nounwind readnone
+
+!llvm.dbg.sp = !{!0, !6, !7}
+!llvm.dbg.lv.inlineprinter = !{!8, !10, !12}
+!llvm.dbg.lv.printer = !{!14, !15, !16}
+!llvm.dbg.lv.main = !{!17, !18, !22}
+
+!0 = metadata !{i32 589870, i32 0, metadata !1, metadata !"inlineprinter", metadata !"inlineprinter", metadata !"", metadata !1, i32 5, metadata !3, i1 false, i1 true, i32 0, i32 0, i32 0, i32 256, i1 true, i32 (i8*, float, i8)* @inlineprinter, null} ; [ DW_TAG_subprogram ]
+!1 = metadata !{i32 589865, metadata !"a.c", metadata !"/private/tmp", metadata !2} ; [ DW_TAG_file_type ]
+!2 = metadata !{i32 589841, i32 0, i32 12, metadata !"a.c", metadata !"/private/tmp", metadata !"clang version 3.0 (trunk 129915)", i1 true, i1 true, metadata !"", i32 0} ; [ DW_TAG_compile_unit ]
+!3 = metadata !{i32 589845, metadata !1, metadata !"", metadata !1, i32 0, i64 0, i64 0, i32 0, i32 0, i32 0, metadata !4, i32 0, i32 0} ; [ DW_TAG_subroutine_type ]
+!4 = metadata !{metadata !5}
+!5 = metadata !{i32 589860, metadata !2, metadata !"int", null, i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ]
+!6 = metadata !{i32 589870, i32 0, metadata !1, metadata !"printer", metadata !"printer", metadata !"", metadata !1, i32 12, metadata !3, i1 false, i1 true, i32 0, i32 0, i32 0, i32 256, i1 true, i32 (i8*, float, i8)* @printer, null} ; [ DW_TAG_subprogram ]
+!7 = metadata !{i32 589870, i32 0, metadata !1, metadata !"main", metadata !"main", metadata !"", metadata !1, i32 18, metadata !3, i1 false, i1 true, i32 0, i32 0, i32 0, i32 256, i1 true, i32 (i32, i8**)* @main, null} ; [ DW_TAG_subprogram ]
+!8 = metadata !{i32 590081, metadata !0, metadata !"ptr", metadata !1, i32 16777220, metadata !9, i32 0} ; [ DW_TAG_arg_variable ]
+!9 = metadata !{i32 589839, metadata !2, metadata !"", null, i32 0, i64 32, i64 32, i64 0, i32 0, null} ; [ DW_TAG_pointer_type ]
+!10 = metadata !{i32 590081, metadata !0, metadata !"val", metadata !1, i32 33554436, metadata !11, i32 0} ; [ DW_TAG_arg_variable ]
+!11 = metadata !{i32 589860, metadata !2, metadata !"float", null, i32 0, i64 32, i64 32, i64 0, i32 0, i32 4} ; [ DW_TAG_base_type ]
+!12 = metadata !{i32 590081, metadata !0, metadata !"c", metadata !1, i32 50331652, metadata !13, i32 0} ; [ DW_TAG_arg_variable ]
+!13 = metadata !{i32 589860, metadata !2, metadata !"unsigned char", null, i32 0, i64 8, i64 8, i64 0, i32 0, i32 8} ; [ DW_TAG_base_type ]
+!14 = metadata !{i32 590081, metadata !6, metadata !"ptr", metadata !1, i32 16777227, metadata !9, i32 0} ; [ DW_TAG_arg_variable ]
+!15 = metadata !{i32 590081, metadata !6, metadata !"val", metadata !1, i32 33554443, metadata !11, i32 0} ; [ DW_TAG_arg_variable ]
+!16 = metadata !{i32 590081, metadata !6, metadata !"c", metadata !1, i32 50331659, metadata !13, i32 0} ; [ DW_TAG_arg_variable ]
+!17 = metadata !{i32 590081, metadata !7, metadata !"argc", metadata !1, i32 16777233, metadata !5, i32 0} ; [ DW_TAG_arg_variable ]
+!18 = metadata !{i32 590081, metadata !7, metadata !"argv", metadata !1, i32 33554449, metadata !19, i32 0} ; [ DW_TAG_arg_variable ]
+!19 = metadata !{i32 589839, metadata !2, metadata !"", null, i32 0, i64 32, i64 32, i64 0, i32 0, metadata !20} ; [ DW_TAG_pointer_type ]
+!20 = metadata !{i32 589839, metadata !2, metadata !"", null, i32 0, i64 32, i64 32, i64 0, i32 0, metadata !21} ; [ DW_TAG_pointer_type ]
+!21 = metadata !{i32 589860, metadata !2, metadata !"char", null, i32 0, i64 8, i64 8, i64 0, i32 0, i32 6} ; [ DW_TAG_base_type ]
+!22 = metadata !{i32 590080, metadata !23, metadata !"dval", metadata !1, i32 19, metadata !11, i32 0} ; [ DW_TAG_auto_variable ]
+!23 = metadata !{i32 589835, metadata !7, i32 18, i32 1, metadata !1, i32 2} ; [ DW_TAG_lexical_block ]
+!24 = metadata !{i32 4, i32 22, metadata !0, null}
+!25 = metadata !{i32 4, i32 33, metadata !0, null}
+!26 = metadata !{i32 4, i32 52, metadata !0, null}
+!27 = metadata !{i32 6, i32 3, metadata !28, null}
+!28 = metadata !{i32 589835, metadata !0, i32 5, i32 1, metadata !1, i32 0} ; [ DW_TAG_lexical_block ]
+!29 = metadata !{i32 7, i32 3, metadata !28, null}
+!30 = metadata !{i32 11, i32 42, metadata !6, null}
+!31 = metadata !{i32 11, i32 53, metadata !6, null}
+!32 = metadata !{i32 11, i32 72, metadata !6, null}
+!33 = metadata !{i32 13, i32 3, metadata !34, null}
+!34 = metadata !{i32 589835, metadata !6, i32 12, i32 1, metadata !1, i32 1} ; [ DW_TAG_lexical_block ]
+!35 = metadata !{i32 14, i32 3, metadata !34, null}
+!36 = metadata !{i32 17, i32 15, metadata !7, null}
+!37 = metadata !{i32 17, i32 28, metadata !7, null}
+!38 = metadata !{i32 19, i32 31, metadata !23, null}
+!39 = metadata !{i32 20, i32 3, metadata !23, null}
+!40 = metadata !{i32 21, i32 3, metadata !23, null}
+!41 = metadata !{i32 4, i32 22, metadata !0, metadata !40}
+!42 = metadata !{i32 4, i32 33, metadata !0, metadata !40}
+!43 = metadata !{i32 4, i32 52, metadata !0, metadata !40}
+!44 = metadata !{i32 6, i32 3, metadata !28, metadata !40}
+!45 = metadata !{i32 22, i32 3, metadata !23, null}
+!46 = metadata !{i32 23, i32 1, metadata !23, null}
diff --git a/test/CodeGen/ARM/divmod.ll b/test/CodeGen/ARM/divmod.ll
new file mode 100644
index 000000000000..34313aa89aae
--- /dev/null
+++ b/test/CodeGen/ARM/divmod.ll
@@ -0,0 +1,58 @@
+; RUN: llc < %s -mtriple=arm-apple-ios | FileCheck %s
+
+define void @foo(i32 %x, i32 %y, i32* nocapture %P) nounwind ssp {
+entry:
+; CHECK: foo:
+; CHECK: bl ___divmodsi4
+; CHECK-NOT: bl ___divmodsi4
+ %div = sdiv i32 %x, %y
+ store i32 %div, i32* %P, align 4
+ %rem = srem i32 %x, %y
+ %arrayidx6 = getelementptr inbounds i32* %P, i32 1
+ store i32 %rem, i32* %arrayidx6, align 4
+ ret void
+}
+
+define void @bar(i32 %x, i32 %y, i32* nocapture %P) nounwind ssp {
+entry:
+; CHECK: bar:
+; CHECK: bl ___udivmodsi4
+; CHECK-NOT: bl ___udivmodsi4
+ %div = udiv i32 %x, %y
+ store i32 %div, i32* %P, align 4
+ %rem = urem i32 %x, %y
+ %arrayidx6 = getelementptr inbounds i32* %P, i32 1
+ store i32 %rem, i32* %arrayidx6, align 4
+ ret void
+}
+
+; rdar://9280991
+@flags = external unnamed_addr global i32
+@tabsize = external unnamed_addr global i32
+
+define void @do_indent(i32 %cols) nounwind {
+entry:
+; CHECK: do_indent:
+ %0 = load i32* @flags, align 4
+ %1 = and i32 %0, 67108864
+ %2 = icmp eq i32 %1, 0
+ br i1 %2, label %bb1, label %bb
+
+bb:
+; CHECK: bl ___divmodsi4
+ %3 = load i32* @tabsize, align 4
+ %4 = srem i32 %cols, %3
+ %5 = sdiv i32 %cols, %3
+ %6 = tail call i32 @llvm.objectsize.i32(i8* null, i1 false)
+ %7 = tail call i8* @__memset_chk(i8* null, i32 9, i32 %5, i32 %6) nounwind
+ br label %bb1
+
+bb1:
+ %line_indent_len.0 = phi i32 [ %4, %bb ], [ 0, %entry ]
+ %8 = getelementptr inbounds i8* null, i32 %line_indent_len.0
+ store i8 0, i8* %8, align 1
+ ret void
+}
+
+declare i32 @llvm.objectsize.i32(i8*, i1) nounwind readnone
+declare i8* @__memset_chk(i8*, i32, i32, i32) nounwind
diff --git a/test/CodeGen/ARM/fabss.ll b/test/CodeGen/ARM/fabss.ll
index f03282bdab7f..51efe51bf152 100644
--- a/test/CodeGen/ARM/fabss.ll
+++ b/test/CodeGen/ARM/fabss.ll
@@ -24,4 +24,4 @@ declare float @fabsf(float)
; CORTEXA8: test:
; CORTEXA8: vabs.f32 d1, d1
; CORTEXA9: test:
-; CORTEXA9: vabs.f32 s1, s1
+; CORTEXA9: vabs.f32 s{{.}}, s{{.}}
diff --git a/test/CodeGen/ARM/fadds.ll b/test/CodeGen/ARM/fadds.ll
index 749690e98d0f..e35103c045eb 100644
--- a/test/CodeGen/ARM/fadds.ll
+++ b/test/CodeGen/ARM/fadds.ll
@@ -20,4 +20,4 @@ entry:
; CORTEXA8: test:
; CORTEXA8: vadd.f32 d0, d1, d0
; CORTEXA9: test:
-; CORTEXA9: vadd.f32 s0, s1, s0
+; CORTEXA9: vadd.f32 s{{.}}, s{{.}}, s{{.}}
diff --git a/test/CodeGen/ARM/fast-isel-pred.ll b/test/CodeGen/ARM/fast-isel-pred.ll
new file mode 100644
index 000000000000..8de54ad5332b
--- /dev/null
+++ b/test/CodeGen/ARM/fast-isel-pred.ll
@@ -0,0 +1,58 @@
+; RUN: llc -O0 -mtriple=armv7-apple-darwin < %s
+
+define i32 @main() nounwind ssp {
+entry:
+ %retval = alloca i32, align 4
+ %X = alloca <4 x i32>, align 16
+ %Y = alloca <4 x float>, align 16
+ store i32 0, i32* %retval
+ %tmp = load <4 x i32>* %X, align 16
+ call void @__aa(<4 x i32> %tmp, i8* null, i32 3, <4 x float>* %Y)
+ %0 = load i32* %retval
+ ret i32 %0
+}
+
+define internal void @__aa(<4 x i32> %v, i8* %p, i32 %offset, <4 x float>* %constants) nounwind inlinehint ssp {
+entry:
+ %__a.addr.i = alloca <4 x i32>, align 16
+ %v.addr = alloca <4 x i32>, align 16
+ %p.addr = alloca i8*, align 4
+ %offset.addr = alloca i32, align 4
+ %constants.addr = alloca <4 x float>*, align 4
+ store <4 x i32> %v, <4 x i32>* %v.addr, align 16
+ store i8* %p, i8** %p.addr, align 4
+ store i32 %offset, i32* %offset.addr, align 4
+ store <4 x float>* %constants, <4 x float>** %constants.addr, align 4
+ %tmp = load <4 x i32>* %v.addr, align 16
+ store <4 x i32> %tmp, <4 x i32>* %__a.addr.i, align 16
+ %tmp.i = load <4 x i32>* %__a.addr.i, align 16
+ %0 = bitcast <4 x i32> %tmp.i to <16 x i8>
+ %1 = bitcast <16 x i8> %0 to <4 x i32>
+ %vcvt.i = sitofp <4 x i32> %1 to <4 x float>
+ %tmp1 = load i8** %p.addr, align 4
+ %tmp2 = load i32* %offset.addr, align 4
+ %tmp3 = load <4 x float>** %constants.addr, align 4
+ call void @__bb(<4 x float> %vcvt.i, i8* %tmp1, i32 %tmp2, <4 x float>* %tmp3)
+ ret void
+}
+
+define internal void @__bb(<4 x float> %v, i8* %p, i32 %offset, <4 x float>* %constants) nounwind inlinehint ssp {
+entry:
+ %v.addr = alloca <4 x float>, align 16
+ %p.addr = alloca i8*, align 4
+ %offset.addr = alloca i32, align 4
+ %constants.addr = alloca <4 x float>*, align 4
+ %data = alloca i64, align 4
+ store <4 x float> %v, <4 x float>* %v.addr, align 16
+ store i8* %p, i8** %p.addr, align 4
+ store i32 %offset, i32* %offset.addr, align 4
+ store <4 x float>* %constants, <4 x float>** %constants.addr, align 4
+ %tmp = load i64* %data, align 4
+ %tmp1 = load i8** %p.addr, align 4
+ %tmp2 = load i32* %offset.addr, align 4
+ %add.ptr = getelementptr i8* %tmp1, i32 %tmp2
+ %0 = bitcast i8* %add.ptr to i64*
+ %arrayidx = getelementptr inbounds i64* %0, i32 0
+ store i64 %tmp, i64* %arrayidx
+ ret void
+}
diff --git a/test/CodeGen/ARM/fast-isel-redefinition.ll b/test/CodeGen/ARM/fast-isel-redefinition.ll
new file mode 100644
index 000000000000..08dcc64c9c84
--- /dev/null
+++ b/test/CodeGen/ARM/fast-isel-redefinition.ll
@@ -0,0 +1,11 @@
+; RUN: llc -O0 -regalloc=linearscan < %s
+; This isn't exactly a useful set of command-line options, but check that it
+; doesn't crash. (It was crashing because a register was getting redefined.)
+
+target triple = "thumbv7-apple-macosx10.6.7"
+
+define i32 @f(i32* %x) nounwind ssp {
+ %y = getelementptr inbounds i32* %x, i32 5000
+ %tmp103 = load i32* %y, align 4
+ ret i32 %tmp103
+}
diff --git a/test/CodeGen/ARM/fast-isel-static.ll b/test/CodeGen/ARM/fast-isel-static.ll
index 8f58480be164..2d79674028ca 100644
--- a/test/CodeGen/ARM/fast-isel-static.ll
+++ b/test/CodeGen/ARM/fast-isel-static.ll
@@ -24,7 +24,7 @@ entry:
store float 0.000000e+00, float* %ztot, align 4
store float 1.000000e+00, float* %z, align 4
; CHECK-LONG: blx r2
-; CHECK-NORM: blx _myadd
+; CHECK-NORM: bl _myadd
call void @myadd(float* %ztot, float* %z)
ret i32 0
}
diff --git a/test/CodeGen/ARM/fast-isel.ll b/test/CodeGen/ARM/fast-isel.ll
index dd806ec6f1ae..6aad92fbc6a4 100644
--- a/test/CodeGen/ARM/fast-isel.ll
+++ b/test/CodeGen/ARM/fast-isel.ll
@@ -1,8 +1,7 @@
-; RUN: llc < %s -O0 -fast-isel-abort -mtriple=armv7-apple-darwin
-; RUN: llc < %s -O0 -fast-isel-abort -mtriple=thumbv7-apple-darwin
+; RUN: llc < %s -O0 -fast-isel-abort -mtriple=armv7-apple-darwin | FileCheck %s --check-prefix=ARM
+; RUN: llc < %s -O0 -fast-isel-abort -mtriple=thumbv7-apple-darwin | FileCheck %s --check-prefix=THUMB
; Very basic fast-isel functionality.
-
define i32 @add(i32 %a, i32 %b) nounwind {
entry:
%a.addr = alloca i32, align 4
@@ -13,4 +12,52 @@ entry:
%tmp1 = load i32* %b.addr
%add = add nsw i32 %tmp, %tmp1
ret i32 %add
-} \ No newline at end of file
+}
+
+; Check truncate to bool
+define void @test1(i32 %tmp) nounwind {
+entry:
+%tobool = trunc i32 %tmp to i1
+br i1 %tobool, label %if.then, label %if.end
+
+if.then: ; preds = %entry
+call void @test1(i32 0)
+br label %if.end
+
+if.end: ; preds = %if.then, %entry
+ret void
+; ARM: test1:
+; ARM: tst r0, #1
+; THUMB: test1:
+; THUMB: tst.w r0, #1
+}
+
+; Check some simple operations with immediates
+define void @test2(i32 %tmp, i32* %ptr) nounwind {
+; THUMB: test2:
+; ARM: test2:
+
+b1:
+ %a = add i32 %tmp, 4096
+ store i32 %a, i32* %ptr
+ br label %b2
+
+; THUMB: add.w {{.*}} #4096
+; ARM: add {{.*}} #1, #20
+
+b2:
+ %b = add i32 %tmp, 4095
+ store i32 %b, i32* %ptr
+ br label %b3
+; THUMB: addw {{.*}} #4095
+; ARM: movw {{.*}} #4095
+; ARM: add
+
+b3:
+ %c = or i32 %tmp, 4
+ store i32 %c, i32* %ptr
+ ret void
+
+; THUMB: orr {{.*}} #4
+; ARM: orr {{.*}} #4
+}
diff --git a/test/CodeGen/ARM/fcopysign.ll b/test/CodeGen/ARM/fcopysign.ll
index d30e3ebf50a5..f241c2681cbf 100644
--- a/test/CodeGen/ARM/fcopysign.ll
+++ b/test/CodeGen/ARM/fcopysign.ll
@@ -40,5 +40,37 @@ entry:
ret double %1
}
+; rdar://9059537
+define i32 @test4() ssp {
+entry:
+; SOFT: test4:
+; SOFT: vmov.f64 [[REG4:(d[0-9]+)]], #1.000000e+00
+; This S-reg must be the first sub-reg of the last D-reg on vbsl.
+; SOFT: vcvt.f32.f64 {{s1?[02468]}}, [[REG4]]
+; SOFT: vshr.u64 [[REG4]], [[REG4]], #32
+; SOFT: vmov.i32 [[REG5:(d[0-9]+)]], #0x80000000
+; SOFT: vbsl [[REG5]], [[REG4]], {{d[0-9]+}}
+ %call80 = tail call double @copysign(double 1.000000e+00, double undef)
+ %conv81 = fptrunc double %call80 to float
+ %tmp88 = bitcast float %conv81 to i32
+ ret i32 %tmp88
+}
+
+; rdar://9287902
+define float @test5() nounwind {
+entry:
+; SOFT: test5:
+; SOFT: vmov.i32 [[REG6:(d[0-9]+)]], #0x80000000
+; SOFT: vmov [[REG7:(d[0-9]+)]], r0, r1
+; SOFT: vshr.u64 [[REG7]], [[REG7]], #32
+; SOFT: vbsl [[REG6]], [[REG7]],
+ %0 = tail call double (...)* @bar() nounwind
+ %1 = fptrunc double %0 to float
+ %2 = tail call float @copysignf(float 5.000000e-01, float %1) nounwind readnone
+ %3 = fadd float %1, %2
+ ret float %3
+}
+
+declare double @bar(...)
declare double @copysign(double, double) nounwind
declare float @copysignf(float, float) nounwind
diff --git a/test/CodeGen/ARM/fdivs.ll b/test/CodeGen/ARM/fdivs.ll
index 0c3149579297..31c1ca940502 100644
--- a/test/CodeGen/ARM/fdivs.ll
+++ b/test/CodeGen/ARM/fdivs.ll
@@ -20,4 +20,4 @@ entry:
; CORTEXA8: test:
; CORTEXA8: vdiv.f32 s0, s1, s0
; CORTEXA9: test:
-; CORTEXA9: vdiv.f32 s0, s1, s0
+; CORTEXA9: vdiv.f32 s{{.}}, s{{.}}, s{{.}}
diff --git a/test/CodeGen/ARM/fmacs.ll b/test/CodeGen/ARM/fmacs.ll
index fb83ef626af6..b63f609e755a 100644
--- a/test/CodeGen/ARM/fmacs.ll
+++ b/test/CodeGen/ARM/fmacs.ll
@@ -1,6 +1,8 @@
; RUN: llc < %s -march=arm -mattr=+vfp2 | FileCheck %s -check-prefix=VFP2
; RUN: llc < %s -march=arm -mattr=+neon | FileCheck %s -check-prefix=NEON
; RUN: llc < %s -march=arm -mcpu=cortex-a8 | FileCheck %s -check-prefix=A8
+; RUN: llc < %s -march=arm -mcpu=cortex-a9 | FileCheck %s -check-prefix=A9
+; RUN: llc < %s -mtriple=arm-linux-gnueabi -mcpu=cortex-a9 -float-abi=hard | FileCheck %s -check-prefix=HARD
define float @t1(float %acc, float %a, float %b) {
entry:
@@ -49,3 +51,54 @@ entry:
%1 = fadd float %0, %acc
ret float %1
}
+
+; It's possible to make use of fp vmla / vmls on Cortex-A9.
+; rdar://8659675
+define void @t4(float %acc1, float %a, float %b, float %acc2, float %c, float* %P1, float* %P2) {
+entry:
+; A8: t4:
+; A8: vmul.f32
+; A8: vmul.f32
+; A8: vadd.f32
+; A8: vadd.f32
+
+; Two vmla with now RAW hazard
+; A9: t4:
+; A9: vmla.f32
+; A9: vmla.f32
+
+; HARD: t4:
+; HARD: vmla.f32 s0, s1, s2
+; HARD: vmla.f32 s3, s1, s4
+ %0 = fmul float %a, %b
+ %1 = fadd float %acc1, %0
+ %2 = fmul float %a, %c
+ %3 = fadd float %acc2, %2
+ store float %1, float* %P1
+ store float %3, float* %P2
+ ret void
+}
+
+define float @t5(float %a, float %b, float %c, float %d, float %e) {
+entry:
+; A8: t5:
+; A8: vmul.f32
+; A8: vmul.f32
+; A8: vadd.f32
+; A8: vadd.f32
+
+; A9: t5:
+; A9: vmla.f32
+; A9: vmul.f32
+; A9: vadd.f32
+
+; HARD: t5:
+; HARD: vmla.f32 s4, s0, s1
+; HARD: vmul.f32 s0, s2, s3
+; HARD: vadd.f32 s0, s4, s0
+ %0 = fmul float %a, %b
+ %1 = fadd float %e, %0
+ %2 = fmul float %c, %d
+ %3 = fadd float %1, %2
+ ret float %3
+}
diff --git a/test/CodeGen/ARM/fmuls.ll b/test/CodeGen/ARM/fmuls.ll
index ef4e3e52818e..bc118b8cb226 100644
--- a/test/CodeGen/ARM/fmuls.ll
+++ b/test/CodeGen/ARM/fmuls.ll
@@ -20,4 +20,4 @@ entry:
; CORTEXA8: test:
; CORTEXA8: vmul.f32 d0, d1, d0
; CORTEXA9: test:
-; CORTEXA9: vmul.f32 s0, s1, s0
+; CORTEXA9: vmul.f32 s{{.}}, s{{.}}, s{{.}}
diff --git a/test/CodeGen/ARM/fnmscs.ll b/test/CodeGen/ARM/fnmscs.ll
index 76c806761f75..9facf20fee7e 100644
--- a/test/CodeGen/ARM/fnmscs.ll
+++ b/test/CodeGen/ARM/fnmscs.ll
@@ -1,6 +1,7 @@
; RUN: llc < %s -march=arm -mattr=+vfp2 | FileCheck %s -check-prefix=VFP2
; RUN: llc < %s -march=arm -mattr=+neon | FileCheck %s -check-prefix=NEON
; RUN: llc < %s -march=arm -mcpu=cortex-a8 | FileCheck %s -check-prefix=A8
+; RUN: llc < %s -march=arm -mcpu=cortex-a8 -regalloc=basic | FileCheck %s -check-prefix=A8
define float @t1(float %acc, float %a, float %b) nounwind {
entry:
@@ -11,8 +12,8 @@ entry:
; NEON: vnmla.f32
; A8: t1:
-; A8: vnmul.f32 s0, s{{[01]}}, s{{[01]}}
-; A8: vsub.f32 d0, d0, d1
+; A8: vnmul.f32 s{{[0-9]}}, s{{[0-9]}}, s{{[0-9]}}
+; A8: vsub.f32 d{{[0-9]}}, d{{[0-9]}}, d{{[0-9]}}
%0 = fmul float %a, %b
%1 = fsub float -0.0, %0
%2 = fsub float %1, %acc
@@ -28,8 +29,8 @@ entry:
; NEON: vnmla.f32
; A8: t2:
-; A8: vnmul.f32 s0, s{{[01]}}, s{{[01]}}
-; A8: vsub.f32 d0, d0, d1
+; A8: vnmul.f32 s{{[0123]}}, s{{[0123]}}, s{{[0123]}}
+; A8: vsub.f32 d{{[0-9]}}, d{{[0-9]}}, d{{[0-9]}}
%0 = fmul float %a, %b
%1 = fmul float -1.0, %0
%2 = fsub float %1, %acc
@@ -45,8 +46,8 @@ entry:
; NEON: vnmla.f64
; A8: t3:
-; A8: vnmul.f64 d16, d1{{[67]}}, d1{{[67]}}
-; A8: vsub.f64 d16, d16, d17
+; A8: vnmul.f64 d1{{[67]}}, d1{{[67]}}, d1{{[67]}}
+; A8: vsub.f64 d1{{[67]}}, d1{{[67]}}, d1{{[67]}}
%0 = fmul double %a, %b
%1 = fsub double -0.0, %0
%2 = fsub double %1, %acc
@@ -62,8 +63,8 @@ entry:
; NEON: vnmla.f64
; A8: t4:
-; A8: vnmul.f64 d16, d1{{[67]}}, d1{{[67]}}
-; A8: vsub.f64 d16, d16, d17
+; A8: vnmul.f64 d1{{[67]}}, d1{{[67]}}, d1{{[67]}}
+; A8: vsub.f64 d1{{[67]}}, d1{{[67]}}, d1{{[67]}}
%0 = fmul double %a, %b
%1 = fmul double -1.0, %0
%2 = fsub double %1, %acc
diff --git a/test/CodeGen/ARM/fp-arg-shuffle.ll b/test/CodeGen/ARM/fp-arg-shuffle.ll
new file mode 100644
index 000000000000..ae02b792e4d6
--- /dev/null
+++ b/test/CodeGen/ARM/fp-arg-shuffle.ll
@@ -0,0 +1,11 @@
+; RUN: llc < %s -march=arm -mattr=+neon -float-abi=soft | FileCheck %s
+
+; CHECK: function1
+; CHECK-NOT: vmov
+define double @function1(double %a, double %b, double %c, double %d, double %e, double %f) nounwind noinline ssp {
+entry:
+ %call = tail call double @function2(double %f, double %e, double %d, double %c, double %b, double %a) nounwind
+ ret double %call
+}
+
+declare double @function2(double, double, double, double, double, double)
diff --git a/test/CodeGen/ARM/fp.ll b/test/CodeGen/ARM/fp.ll
index b6e9c3c22e75..8ef45f2bbc97 100644
--- a/test/CodeGen/ARM/fp.ll
+++ b/test/CodeGen/ARM/fp.ll
@@ -51,7 +51,7 @@ entry:
define float @h2() {
;CHECK: h2:
-;CHECK: mov r0, #254, 10
+;CHECK: mov r0, #254, #10
entry:
ret float 1.000000e+00
}
diff --git a/test/CodeGen/ARM/fp_convert.ll b/test/CodeGen/ARM/fp_convert.ll
index 1ef9f7f32164..86c06f1ddd9e 100644
--- a/test/CodeGen/ARM/fp_convert.ll
+++ b/test/CodeGen/ARM/fp_convert.ll
@@ -5,7 +5,7 @@
define i32 @test1(float %a, float %b) {
; VFP2: test1:
-; VFP2: vcvt.s32.f32 s0, s0
+; VFP2: vcvt.s32.f32 s{{.}}, s{{.}}
; NEON: test1:
; NEON: vcvt.s32.f32 d0, d0
entry:
@@ -16,7 +16,7 @@ entry:
define i32 @test2(float %a, float %b) {
; VFP2: test2:
-; VFP2: vcvt.u32.f32 s0, s0
+; VFP2: vcvt.u32.f32 s{{.}}, s{{.}}
; NEON: test2:
; NEON: vcvt.u32.f32 d0, d0
entry:
@@ -27,7 +27,7 @@ entry:
define float @test3(i32 %a, i32 %b) {
; VFP2: test3:
-; VFP2: vcvt.f32.u32 s0, s0
+; VFP2: vcvt.f32.u32 s{{.}}, s{{.}}
; NEON: test3:
; NEON: vcvt.f32.u32 d0, d0
entry:
@@ -38,7 +38,7 @@ entry:
define float @test4(i32 %a, i32 %b) {
; VFP2: test4:
-; VFP2: vcvt.f32.s32 s0, s0
+; VFP2: vcvt.f32.s32 s{{.}}, s{{.}}
; NEON: test4:
; NEON: vcvt.f32.s32 d0, d0
entry:
diff --git a/test/CodeGen/ARM/fpcmp-opt.ll b/test/CodeGen/ARM/fpcmp-opt.ll
index 65b921bdf655..7c0dd0e12a79 100644
--- a/test/CodeGen/ARM/fpcmp-opt.ll
+++ b/test/CodeGen/ARM/fpcmp-opt.ll
@@ -37,7 +37,7 @@ define arm_apcscc i32 @t2(double* %a, double* %b) nounwind {
entry:
; FINITE: t2:
; FINITE-NOT: vldr
-; FINITE: ldrd r0, [r0]
+; FINITE: ldrd r0, r1, [r0]
; FINITE-NOT: b LBB
; FINITE: cmp r0, #0
; FINITE: cmpeq r1, #0
diff --git a/test/CodeGen/ARM/ifcvt10.ll b/test/CodeGen/ARM/ifcvt10.ll
index 75428ac21655..18f87bfc2e71 100644
--- a/test/CodeGen/ARM/ifcvt10.ll
+++ b/test/CodeGen/ARM/ifcvt10.ll
@@ -9,9 +9,9 @@ entry:
; CHECK: t:
; CHECK: vpop {d8}
; CHECK-NOT: vpopne
-; CHECK: ldmia sp!, {r7, pc}
+; CHECK: pop {r7, pc}
; CHECK: vpop {d8}
-; CHECK: ldmia sp!, {r7, pc}
+; CHECK: pop {r7, pc}
br i1 undef, label %if.else, label %if.then
if.then: ; preds = %entry
diff --git a/test/CodeGen/ARM/ifcvt5.ll b/test/CodeGen/ARM/ifcvt5.ll
index bca2ae346a6f..3615055f8b29 100644
--- a/test/CodeGen/ARM/ifcvt5.ll
+++ b/test/CodeGen/ARM/ifcvt5.ll
@@ -11,7 +11,7 @@ entry:
define i32 @t1(i32 %a, i32 %b) {
; CHECK: t1:
-; CHECK: ldmialt sp!, {r7, pc}
+; CHECK: poplt {r7, pc}
entry:
%tmp1 = icmp sgt i32 %a, 10 ; <i1> [#uses=1]
br i1 %tmp1, label %cond_true, label %UnifiedReturnBlock
diff --git a/test/CodeGen/ARM/ifcvt6.ll b/test/CodeGen/ARM/ifcvt6.ll
index 5edf32fd1af6..232765768550 100644
--- a/test/CodeGen/ARM/ifcvt6.ll
+++ b/test/CodeGen/ARM/ifcvt6.ll
@@ -3,7 +3,7 @@
define void @foo(i32 %X, i32 %Y) {
entry:
; CHECK: cmpne
-; CHECK: ldmiahi sp!
+; CHECK: pophi
%tmp1 = icmp ult i32 %X, 4 ; <i1> [#uses=1]
%tmp4 = icmp eq i32 %Y, 0 ; <i1> [#uses=1]
%tmp7 = or i1 %tmp4, %tmp1 ; <i1> [#uses=1]
diff --git a/test/CodeGen/ARM/ifcvt7.ll b/test/CodeGen/ARM/ifcvt7.ll
index 62e13557cfdc..476ed4d47c64 100644
--- a/test/CodeGen/ARM/ifcvt7.ll
+++ b/test/CodeGen/ARM/ifcvt7.ll
@@ -6,7 +6,7 @@
define fastcc i32 @CountTree(%struct.quad_struct* %tree) {
; CHECK: cmpeq
; CHECK: moveq
-; CHECK: ldmiaeq sp!
+; CHECK: popeq
entry:
br label %tailrecurse
diff --git a/test/CodeGen/ARM/ifcvt8.ll b/test/CodeGen/ARM/ifcvt8.ll
index 5fdfc4ea6805..ca9a5c63cda6 100644
--- a/test/CodeGen/ARM/ifcvt8.ll
+++ b/test/CodeGen/ARM/ifcvt8.ll
@@ -5,7 +5,7 @@
declare void @abort()
define fastcc void @t(%struct.SString* %word, i8 signext %c) {
-; CHECK: ldmiane sp!
+; CHECK: popne
entry:
%tmp1 = icmp eq %struct.SString* %word, null ; <i1> [#uses=1]
br i1 %tmp1, label %cond_true, label %cond_false
diff --git a/test/CodeGen/ARM/indirectbr.ll b/test/CodeGen/ARM/indirectbr.ll
index 0aac9d16ec6c..f0ab9dd7ea00 100644
--- a/test/CodeGen/ARM/indirectbr.ll
+++ b/test/CodeGen/ARM/indirectbr.ll
@@ -14,15 +14,15 @@ entry:
%1 = icmp eq i8* %0, null ; <i1> [#uses=1]
; indirect branch gets duplicated here
; ARM: bx
-; THUMB: mov pc, r1
-; THUMB2: mov pc, r2
+; THUMB: mov pc,
+; THUMB2: mov pc,
br i1 %1, label %bb3, label %bb2
bb2: ; preds = %entry, %bb3
%gotovar.4.0 = phi i8* [ %gotovar.4.0.pre, %bb3 ], [ %0, %entry ] ; <i8*> [#uses=1]
; ARM: bx
-; THUMB: mov pc, r1
-; THUMB2: mov pc, r2
+; THUMB: mov pc,
+; THUMB2: mov pc,
indirectbr i8* %gotovar.4.0, [label %L5, label %L4, label %L3, label %L2, label %L1]
bb3: ; preds = %entry
@@ -42,20 +42,23 @@ L3: ; preds = %L4, %bb2
br label %L2
L2: ; preds = %L3, %bb2
+; THUMB: muls
%res.2 = phi i32 [ %res.1, %L3 ], [ 1, %bb2 ] ; <i32> [#uses=1]
%phitmp = mul i32 %res.2, 6 ; <i32> [#uses=1]
br label %L1
L1: ; preds = %L2, %bb2
%res.3 = phi i32 [ %phitmp, %L2 ], [ 2, %bb2 ] ; <i32> [#uses=1]
-; ARM: ldr r1, LCPI
-; ARM: add r1, pc, r1
-; ARM: str r1
-; THUMB: ldr.n r2, LCPI
-; THUMB: add r2, pc
-; THUMB: str r2
-; THUMB2: ldr.n r2, LCPI
-; THUMB2-NEXT: str r2
+; ARM: ldr [[R1:r[0-9]+]], LCPI
+; ARM: add [[R1b:r[0-9]+]], pc, [[R1]]
+; ARM: str [[R1b]]
+; THUMB: ldr.n
+; THUMB: add
+; THUMB: ldr.n [[R2:r[0-9]+]], LCPI
+; THUMB: add [[R2]], pc
+; THUMB: str [[R2]]
+; THUMB2: ldr.n [[R2:r[0-9]+]], LCPI
+; THUMB2-NEXT: str{{(.w)?}} [[R2]]
store i8* blockaddress(@foo, %L5), i8** @nextaddr, align 4
ret i32 %res.3
}
diff --git a/test/CodeGen/ARM/inlineasm3.ll b/test/CodeGen/ARM/inlineasm3.ll
index 9f77ad1f794c..9d6eba85301e 100644
--- a/test/CodeGen/ARM/inlineasm3.ll
+++ b/test/CodeGen/ARM/inlineasm3.ll
@@ -6,7 +6,7 @@
define void @t() nounwind {
entry:
; CHECK: vmov.I64 q15, #0
-; CHECK: vmov.32 d30[0], r0
+; CHECK: vmov.32 d30[0],
; CHECK: vmov q8, q15
%tmp = alloca %struct.int32x4_t, align 16
call void asm sideeffect "vmov.I64 q15, #0\0Avmov.32 d30[0], $1\0Avmov ${0:q}, q15\0A", "=*w,r,~{d31},~{d30}"(%struct.int32x4_t* %tmp, i32 8192) nounwind
diff --git a/test/CodeGen/ARM/int-to-fp.ll b/test/CodeGen/ARM/int-to-fp.ll
new file mode 100644
index 000000000000..889b14919840
--- /dev/null
+++ b/test/CodeGen/ARM/int-to-fp.ll
@@ -0,0 +1,19 @@
+; RUN: llc < %s | FileCheck %s
+target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:64:64-v128:128:128-a0:0:32-n32"
+target triple = "thumbv7-apple-darwin10.0.0"
+
+; CHECK: sint_to_fp
+; CHECK: vmovl.s16
+; CHECK: vcvt.f32.s32
+define <4 x float> @sint_to_fp(<4 x i16> %x) nounwind ssp {
+ %a = sitofp <4 x i16> %x to <4 x float>
+ ret <4 x float> %a
+}
+
+; CHECK: uint_to_fp
+; CHECK: vmovl.u16
+; CHECK: vcvt.f32.u32
+define <4 x float> @uint_to_fp(<4 x i16> %x) nounwind ssp {
+ %a = uitofp <4 x i16> %x to <4 x float>
+ ret <4 x float> %a
+}
diff --git a/test/CodeGen/ARM/ldm.ll b/test/CodeGen/ARM/ldm.ll
index 2f1b85ebbb04..db78fd06ab2d 100644
--- a/test/CodeGen/ARM/ldm.ll
+++ b/test/CodeGen/ARM/ldm.ll
@@ -5,9 +5,9 @@
define i32 @t1() {
; CHECK: t1:
-; CHECK: ldmia
+; CHECK: pop
; V4T: t1:
-; V4T: ldmia
+; V4T: pop
%tmp = load i32* getelementptr ([0 x i32]* @X, i32 0, i32 0) ; <i32> [#uses=1]
%tmp3 = load i32* getelementptr ([0 x i32]* @X, i32 0, i32 1) ; <i32> [#uses=1]
%tmp4 = tail call i32 @f1( i32 %tmp, i32 %tmp3 ) ; <i32> [#uses=1]
@@ -16,9 +16,9 @@ define i32 @t1() {
define i32 @t2() {
; CHECK: t2:
-; CHECK: ldmia
+; CHECK: pop
; V4T: t2:
-; V4T: ldmia
+; V4T: pop
%tmp = load i32* getelementptr ([0 x i32]* @X, i32 0, i32 2) ; <i32> [#uses=1]
%tmp3 = load i32* getelementptr ([0 x i32]* @X, i32 0, i32 3) ; <i32> [#uses=1]
%tmp5 = load i32* getelementptr ([0 x i32]* @X, i32 0, i32 4) ; <i32> [#uses=1]
@@ -29,7 +29,7 @@ define i32 @t2() {
define i32 @t3() {
; CHECK: t3:
; CHECK: ldmib
-; CHECK: ldmia sp!
+; CHECK: pop
; V4T: t3:
; V4T: ldmib
; V4T: pop
diff --git a/test/CodeGen/ARM/ldrd.ll b/test/CodeGen/ARM/ldrd.ll
index 895562a1d31e..8010f20689be 100644
--- a/test/CodeGen/ARM/ldrd.ll
+++ b/test/CodeGen/ARM/ldrd.ll
@@ -1,19 +1,21 @@
-; RUN: llc < %s -mtriple=armv6-apple-darwin | FileCheck %s -check-prefix=V6
-; RUN: llc < %s -mtriple=armv5-apple-darwin | FileCheck %s -check-prefix=V5
-; RUN: llc < %s -mtriple=armv6-eabi | FileCheck %s -check-prefix=EABI
+; RUN: llc < %s -mtriple=armv6-apple-darwin -regalloc=linearscan | FileCheck %s -check-prefix=V6
+; RUN: llc < %s -mtriple=armv5-apple-darwin -regalloc=linearscan | FileCheck %s -check-prefix=V5
+; RUN: llc < %s -mtriple=armv6-eabi -regalloc=linearscan | FileCheck %s -check-prefix=EABI
; rdar://r6949835
+; Magic ARM pair hints works best with linearscan.
+
@b = external global i64*
define i64 @t(i64 %a) nounwind readonly {
entry:
-;V6: ldrd r2, [r2]
+;V6: ldrd r2, r3, [r2]
-;V5: ldr r3, [r2]
-;V5: ldr r2, [r2, #4]
+;V5: ldr r{{[0-9]+}}, [r2]
+;V5: ldr r{{[0-9]+}}, [r2, #4]
-;EABI: ldr r3, [r2]
-;EABI: ldr r2, [r2, #4]
+;EABI: ldr r{{[0-9]+}}, [r2]
+;EABI: ldr r{{[0-9]+}}, [r2, #4]
%0 = load i64** @b, align 4
%1 = load i64* %0, align 4
diff --git a/test/CodeGen/ARM/long.ll b/test/CodeGen/ARM/long.ll
index 74f8d783377d..e401dca1ca80 100644
--- a/test/CodeGen/ARM/long.ll
+++ b/test/CodeGen/ARM/long.ll
@@ -14,14 +14,14 @@ entry:
define i64 @f3() {
; CHECK: f3:
-; CHECK: mvn r0, #2, 2
+; CHECK: mvn r0, #2, #2
entry:
ret i64 2147483647
}
define i64 @f4() {
; CHECK: f4:
-; CHECK: mov r0, #2, 2
+; CHECK: mov r0, #2, #2
entry:
ret i64 2147483648
}
@@ -29,7 +29,7 @@ entry:
define i64 @f5() {
; CHECK: f5:
; CHECK: mvn r0, #0
-; CHECK: mvn r1, #2, 2
+; CHECK: mvn r1, #2, #2
entry:
ret i64 9223372036854775807
}
diff --git a/test/CodeGen/ARM/long_shift.ll b/test/CodeGen/ARM/long_shift.ll
index 5e4f5730f8d2..d5aac2e3ddaf 100644
--- a/test/CodeGen/ARM/long_shift.ll
+++ b/test/CodeGen/ARM/long_shift.ll
@@ -24,9 +24,10 @@ define i32 @f2(i64 %x, i64 %y) {
; CHECK: f2
; CHECK: lsr{{.*}}r2
; CHECK-NEXT: rsb r3, r2, #32
-; CHECK-NEXT: subs r2, r2, #32
+; CHECK-NEXT: sub r2, r2, #32
+; CHECK-NEXT: cmp r2, #0
; CHECK-NEXT: orr r0, r0, r1, lsl r3
-; CHECK-NEXT: movge r0, r1, asr r2
+; CHECK-NEXT: asrge r0, r1, r2
%a = ashr i64 %x, %y
%b = trunc i64 %a to i32
ret i32 %b
@@ -36,9 +37,10 @@ define i32 @f3(i64 %x, i64 %y) {
; CHECK: f3
; CHECK: lsr{{.*}}r2
; CHECK-NEXT: rsb r3, r2, #32
-; CHECK-NEXT: subs r2, r2, #32
+; CHECK-NEXT: sub r2, r2, #32
+; CHECK-NEXT: cmp r2, #0
; CHECK-NEXT: orr r0, r0, r1, lsl r3
-; CHECK-NEXT: movge r0, r1, lsr r2
+; CHECK-NEXT: lsrge r0, r1, r2
%a = lshr i64 %x, %y
%b = trunc i64 %a to i32
ret i32 %b
diff --git a/test/CodeGen/ARM/lsr-code-insertion.ll b/test/CodeGen/ARM/lsr-code-insertion.ll
index 1bbb96deeefe..153fd8fe34e4 100644
--- a/test/CodeGen/ARM/lsr-code-insertion.ll
+++ b/test/CodeGen/ARM/lsr-code-insertion.ll
@@ -1,5 +1,4 @@
-; RUN: llc < %s -stats |& grep {39.*Number of machine instrs printed}
-; RUN: llc < %s -stats |& not grep {.*Number of re-materialization}
+; RUN: llc < %s | FileCheck %s
; This test really wants to check that the resultant "cond_true" block only
; has a single store in it, and that cond_true55 only has code to materialize
; the constant and do a store. We do *not* want something like this:
@@ -8,6 +7,11 @@
; add r8, r0, r6
; str r10, [r8, #+4]
;
+; CHECK: ldr [[R6:r[0-9*]+]], LCP
+; CHECK: cmp {{.*}}, [[R6]]
+; CHECK: ldrle
+; CHECK-NEXT: strle
+
target triple = "arm-apple-darwin8"
define void @foo(i32* %mc, i32* %mpp, i32* %ip, i32* %dpp, i32* %tpmm, i32 %M, i32* %tpim, i32* %tpdm, i32* %bp, i32* %ms, i32 %xmb) {
diff --git a/test/CodeGen/ARM/lsr-on-unrolled-loops.ll b/test/CodeGen/ARM/lsr-on-unrolled-loops.ll
index 9882690da268..c1318ec31f58 100644
--- a/test/CodeGen/ARM/lsr-on-unrolled-loops.ll
+++ b/test/CodeGen/ARM/lsr-on-unrolled-loops.ll
@@ -4,11 +4,6 @@
; constant offset addressing, so that each of the following stores
; uses the same register.
-; CHECK: vstr.32 s{{.*}}, [{{(r[0-9]+)|(lr)}}, #-128]
-; CHECK: vstr.32 s{{.*}}, [{{(r[0-9]+)|(lr)}}, #-96]
-; CHECK: vstr.32 s{{.*}}, [{{(r[0-9]+)|(lr)}}, #-64]
-; CHECK: vstr.32 s{{.*}}, [{{(r[0-9]+)|(lr)}}, #-32]
-; CHECK: vstr.32 s{{.*}}, [{{(r[0-9]+)|(lr)}}]
; CHECK: vstr.32 s{{.*}}, [{{(r[0-9]+)|(lr)}}, #32]
; CHECK: vstr.32 s{{.*}}, [{{(r[0-9]+)|(lr)}}, #64]
; CHECK: vstr.32 s{{.*}}, [{{(r[0-9]+)|(lr)}}, #96]
diff --git a/test/CodeGen/ARM/memcpy-inline.ll b/test/CodeGen/ARM/memcpy-inline.ll
index ed20c32dc0d5..5bae037cafb3 100644
--- a/test/CodeGen/ARM/memcpy-inline.ll
+++ b/test/CodeGen/ARM/memcpy-inline.ll
@@ -1,9 +1,11 @@
-; RUN: llc < %s -mtriple=arm-apple-darwin | grep ldmia
-; RUN: llc < %s -mtriple=arm-apple-darwin | grep stmia
-; RUN: llc < %s -mtriple=arm-apple-darwin | grep ldrb
-; RUN: llc < %s -mtriple=arm-apple-darwin | grep ldrh
+; RUN: llc < %s -mtriple=thumbv7-apple-darwin -regalloc=linearscan -disable-post-ra | FileCheck %s
- %struct.x = type { i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }
+; The ARM magic hinting works best with linear scan.
+; CHECK: ldrd
+; CHECK: strd
+; CHECK: ldrb
+
+%struct.x = type { i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }
@src = external global %struct.x
@dst = external global %struct.x
diff --git a/test/CodeGen/ARM/neon_div.ll b/test/CodeGen/ARM/neon_div.ll
index e33797079093..de48feeb9ec2 100644
--- a/test/CodeGen/ARM/neon_div.ll
+++ b/test/CodeGen/ARM/neon_div.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -march=arm -mattr=+neon | FileCheck %s
+; RUN: llc < %s -march=arm -mattr=+neon -pre-RA-sched=source | FileCheck %s
define <8 x i8> @sdivi8(<8 x i8>* %A, <8 x i8>* %B) nounwind {
;CHECK: vrecpe.f32
diff --git a/test/CodeGen/ARM/neon_shift.ll b/test/CodeGen/ARM/neon_shift.ll
new file mode 100644
index 000000000000..340f220fb362
--- /dev/null
+++ b/test/CodeGen/ARM/neon_shift.ll
@@ -0,0 +1,11 @@
+; RUN: llc < %s -march=arm -mattr=+neon | FileCheck %s
+
+; <rdar://problem/9055897>
+define <4 x i16> @t1(<4 x i32> %a) nounwind {
+entry:
+; CHECK: vqrshrn.s32 d{{[0-9]+}}, q{{[0-9]*}}, #13
+ %x = tail call <4 x i16> @llvm.arm.neon.vqrshiftns.v4i16(<4 x i32> %a, <4 x i32> <i32 -13, i32 -13, i32 -13, i32 -13>)
+ ret <4 x i16> %x
+}
+
+declare <4 x i16> @llvm.arm.neon.vqrshiftns.v4i16(<4 x i32>, <4 x i32>) nounwind readnone
diff --git a/test/CodeGen/ARM/peephole-bitcast.ll b/test/CodeGen/ARM/peephole-bitcast.ll
new file mode 100644
index 000000000000..e670a5be3bca
--- /dev/null
+++ b/test/CodeGen/ARM/peephole-bitcast.ll
@@ -0,0 +1,26 @@
+; RUN: llc < %s -march=arm -mcpu=cortex-a8 -regalloc=linearscan | FileCheck %s
+
+; vmov s0, r0 + vmov r0, s0 should have been optimized away.
+; rdar://9104514
+
+; Peephole leaves a dead vmovsr instruction behind, and depends on linear scan
+; to remove it.
+
+define void @t(float %x) nounwind ssp {
+entry:
+; CHECK: t:
+; CHECK-NOT: vmov
+; CHECK: bl
+ %0 = bitcast float %x to i32
+ %cmp = icmp ult i32 %0, 2139095039
+ br i1 %cmp, label %if.then, label %if.end
+
+if.then: ; preds = %entry
+ tail call void @doSomething(float %x) nounwind
+ br label %if.end
+
+if.end: ; preds = %if.then, %entry
+ ret void
+}
+
+declare void @doSomething(float)
diff --git a/test/CodeGen/ARM/prefetch.ll b/test/CodeGen/ARM/prefetch.ll
index 895b27b749db..95f082aa9385 100644
--- a/test/CodeGen/ARM/prefetch.ll
+++ b/test/CodeGen/ARM/prefetch.ll
@@ -1,10 +1,15 @@
; RUN: llc < %s -march=thumb -mattr=-thumb2 | not grep pld
-; RUN: llc < %s -march=thumb -mattr=+v7a | FileCheck %s -check-prefix=THUMB2
-; RUN: llc < %s -march=arm -mattr=+v7a,+mp | FileCheck %s -check-prefix=ARM-MP
+; RUN: llc < %s -march=thumb -mattr=+v7a | FileCheck %s -check-prefix=THUMB2
+; RUN: llc < %s -march=arm -mattr=+v7a | FileCheck %s -check-prefix=ARM
+; RUN: llc < %s -march=arm -mcpu=cortex-a9-mp | FileCheck %s -check-prefix=ARM-MP
; rdar://8601536
define void @t1(i8* %ptr) nounwind {
entry:
+; ARM: t1:
+; ARM-NOT: pldw [r0]
+; ARM: pld [r0]
+
; ARM-MP: t1:
; ARM-MP: pldw [r0]
; ARM-MP: pld [r0]
@@ -19,8 +24,8 @@ entry:
define void @t2(i8* %ptr) nounwind {
entry:
-; ARM-MP: t2:
-; ARM-MP: pld [r0, #1023]
+; ARM: t2:
+; ARM: pld [r0, #1023]
; THUMB2: t2:
; THUMB2: pld [r0, #1023]
@@ -31,8 +36,8 @@ entry:
define void @t3(i32 %base, i32 %offset) nounwind {
entry:
-; ARM-MP: t3:
-; ARM-MP: pld [r0, r1, lsr #2]
+; ARM: t3:
+; ARM: pld [r0, r1, lsr #2]
; THUMB2: t3:
; THUMB2: lsrs r1, r1, #2
@@ -46,8 +51,8 @@ entry:
define void @t4(i32 %base, i32 %offset) nounwind {
entry:
-; ARM-MP: t4:
-; ARM-MP: pld [r0, r1, lsl #2]
+; ARM: t4:
+; ARM: pld [r0, r1, lsl #2]
; THUMB2: t4:
; THUMB2: pld [r0, r1, lsl #2]
diff --git a/test/CodeGen/ARM/reg_sequence.ll b/test/CodeGen/ARM/reg_sequence.ll
index 53214fd4c302..d350937c683e 100644
--- a/test/CodeGen/ARM/reg_sequence.ll
+++ b/test/CodeGen/ARM/reg_sequence.ll
@@ -1,4 +1,5 @@
; RUN: llc < %s -march=arm -mcpu=cortex-a8 | FileCheck %s
+; RUN: llc < %s -march=arm -mcpu=cortex-a8 -regalloc=basic | FileCheck %s
; Implementing vld / vst as REG_SEQUENCE eliminates the extra vmov's.
%struct.int16x8_t = type { <8 x i16> }
@@ -123,9 +124,9 @@ return1:
return2:
; CHECK: %return2
; CHECK: vadd.i32
-; CHECK: vmov q9, q11
+; CHECK: vmov {{q[0-9]+}}, {{q[0-9]+}}
; CHECK-NOT: vmov
-; CHECK: vst2.32 {d16, d17, d18, d19}
+; CHECK: vst2.32 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}
%tmp100 = extractvalue %struct.__neon_int32x4x2_t %tmp2, 0 ; <<4 x i32>> [#uses=1]
%tmp101 = extractvalue %struct.__neon_int32x4x2_t %tmp5, 1 ; <<4 x i32>> [#uses=1]
%tmp102 = add <4 x i32> %tmp100, %tmp101 ; <<4 x i32>> [#uses=1]
@@ -137,9 +138,10 @@ return2:
define <8 x i16> @t5(i16* %A, <8 x i16>* %B) nounwind {
; CHECK: t5:
; CHECK: vldmia
-; CHECK: vmov q9, q8
+; How can FileCheck match Q and D registers? We need a lisp interpreter.
+; CHECK: vmov {{q[0-9]+}}, {{q[0-9]+}}
; CHECK-NOT: vmov
-; CHECK: vld2.16 {d16[1], d18[1]}, [r0]
+; CHECK: vld2.16 {d{{[0-9]+}}[1], d{{[0-9]+}}[1]}, [r0]
; CHECK-NOT: vmov
; CHECK: vadd.i16
%tmp0 = bitcast i16* %A to i8* ; <i8*> [#uses=1]
@@ -154,8 +156,8 @@ define <8 x i16> @t5(i16* %A, <8 x i16>* %B) nounwind {
define <8 x i8> @t6(i8* %A, <8 x i8>* %B) nounwind {
; CHECK: t6:
; CHECK: vldr.64
-; CHECK: vmov d17, d16
-; CHECK-NEXT: vld2.8 {d16[1], d17[1]}
+; CHECK: vmov d[[D0:[0-9]+]], d[[D1:[0-9]+]]
+; CHECK-NEXT: vld2.8 {d[[D1]][1], d[[D0]][1]}
%tmp1 = load <8 x i8>* %B ; <<8 x i8>> [#uses=2]
%tmp2 = call %struct.__neon_int8x8x2_t @llvm.arm.neon.vld2lane.v8i8(i8* %A, <8 x i8> %tmp1, <8 x i8> %tmp1, i32 1, i32 1) ; <%struct.__neon_int8x8x2_t> [#uses=2]
%tmp3 = extractvalue %struct.__neon_int8x8x2_t %tmp2, 0 ; <<8 x i8>> [#uses=1]
@@ -169,10 +171,10 @@ entry:
; CHECK: t7:
; CHECK: vld2.32
; CHECK: vst2.32
-; CHECK: vld1.32 {d16, d17},
-; CHECK: vmov q9, q8
+; CHECK: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}},
+; CHECK: vmov q[[Q0:[0-9]+]], q[[Q1:[0-9]+]]
; CHECK-NOT: vmov
-; CHECK: vuzp.32 q8, q9
+; CHECK: vuzp.32 q[[Q1]], q[[Q0]]
; CHECK: vst1.32
%0 = bitcast i32* %iptr to i8* ; <i8*> [#uses=2]
%1 = tail call %struct.__neon_int32x4x2_t @llvm.arm.neon.vld2.v4i32(i8* %0, i32 1) ; <%struct.__neon_int32x4x2_t> [#uses=2]
@@ -271,7 +273,7 @@ define arm_aapcs_vfpcc i32 @t10() nounwind {
entry:
; CHECK: t10:
; CHECK: vmul.f32 q8, q8, d0[0]
-; CHECK: vmov.i32 q9, #0x3F000000
+; CHECK: vmov.i32 q[[Q0:[0-9]+]], #0x3F000000
; CHECK: vadd.f32 q8, q8, q8
%0 = shufflevector <4 x float> zeroinitializer, <4 x float> undef, <4 x i32> zeroinitializer ; <<4 x float>> [#uses=1]
%1 = insertelement <4 x float> %0, float undef, i32 1 ; <<4 x float>> [#uses=1]
diff --git a/test/CodeGen/ARM/rev.ll b/test/CodeGen/ARM/rev.ll
index 687bf8834c9f..4170ff3071ad 100644
--- a/test/CodeGen/ARM/rev.ll
+++ b/test/CodeGen/ARM/rev.ll
@@ -1,6 +1,6 @@
; RUN: llc < %s -march=arm -mattr=+v6 | FileCheck %s
-define i32 @test1(i32 %X) {
+define i32 @test1(i32 %X) nounwind {
; CHECK: test1
; CHECK: rev16 r0, r0
%tmp1 = lshr i32 %X, 8
@@ -16,7 +16,7 @@ define i32 @test1(i32 %X) {
ret i32 %tmp14
}
-define i32 @test2(i32 %X) {
+define i32 @test2(i32 %X) nounwind {
; CHECK: test2
; CHECK: revsh r0, r0
%tmp1 = lshr i32 %X, 8
@@ -28,3 +28,29 @@ define i32 @test2(i32 %X) {
%tmp5.upgrd.2 = sext i16 %tmp5 to i32
ret i32 %tmp5.upgrd.2
}
+
+; rdar://9147637
+define i32 @test3(i16 zeroext %a) nounwind {
+entry:
+; CHECK: test3:
+; CHECK: revsh r0, r0
+ %0 = tail call i16 @llvm.bswap.i16(i16 %a)
+ %1 = sext i16 %0 to i32
+ ret i32 %1
+}
+
+declare i16 @llvm.bswap.i16(i16) nounwind readnone
+
+define i32 @test4(i16 zeroext %a) nounwind {
+entry:
+; CHECK: test4:
+; CHECK: revsh r0, r0
+ %conv = zext i16 %a to i32
+ %shr9 = lshr i16 %a, 8
+ %conv2 = zext i16 %shr9 to i32
+ %shl = shl nuw nsw i32 %conv, 8
+ %or = or i32 %conv2, %shl
+ %sext = shl i32 %or, 16
+ %conv8 = ashr exact i32 %sext, 16
+ ret i32 %conv8
+}
diff --git a/test/CodeGen/ARM/select-imm.ll b/test/CodeGen/ARM/select-imm.ll
index 578834ec93bc..82ed0184badd 100644
--- a/test/CodeGen/ARM/select-imm.ll
+++ b/test/CodeGen/ARM/select-imm.ll
@@ -6,7 +6,7 @@ define i32 @t1(i32 %c) nounwind readnone {
entry:
; ARM: t1:
; ARM: mov r1, #101
-; ARM: orr r1, r1, #1, 24
+; ARM: orr r1, r1, #1, #24
; ARM: movgt r0, #123
; ARMT2: t1:
@@ -27,7 +27,7 @@ entry:
; ARM: t2:
; ARM: mov r0, #123
; ARM: movgt r0, #101
-; ARM: orrgt r0, r0, #1, 24
+; ARM: orrgt r0, r0, #1, #24
; ARMT2: t2:
; ARMT2: mov r0, #123
diff --git a/test/CodeGen/ARM/select.ll b/test/CodeGen/ARM/select.ll
index 1aa0d3904125..d1493ee56e4b 100644
--- a/test/CodeGen/ARM/select.ll
+++ b/test/CodeGen/ARM/select.ll
@@ -90,3 +90,26 @@ define arm_apcscc float @f8(i32 %a) nounwind {
%tmp1 = select i1 %tmp, float 0x3FF3BE76C0000000, float 0x40030E9A20000000
ret float %tmp1
}
+
+; <rdar://problem/9049552>
+; Glue values can only have a single use, but the following test exposed a
+; case where a SELECT was lowered with 2 uses of a comparison, causing the
+; scheduler to assert.
+; CHECK-VFP: f9:
+
+declare i8* @objc_msgSend(i8*, i8*, ...)
+define void @f9() optsize {
+entry:
+ %cmp = icmp eq i8* undef, inttoptr (i32 4 to i8*)
+ %conv191 = select i1 %cmp, float -3.000000e+00, float 0.000000e+00
+ %conv195 = select i1 %cmp, double -1.000000e+00, double 0.000000e+00
+ %add = fadd double %conv195, 1.100000e+01
+ %conv196 = fptrunc double %add to float
+ %add201 = fadd float undef, %conv191
+ %tmp484 = bitcast float %conv196 to i32
+ %tmp478 = bitcast float %add201 to i32
+ %tmp490 = insertvalue [2 x i32] undef, i32 %tmp484, 0
+ %tmp493 = insertvalue [2 x i32] %tmp490, i32 %tmp478, 1
+ call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, [2 x i32], i32, float)*)(i8* undef, i8* undef, [2 x i32] %tmp493, i32 0, float 1.000000e+00) optsize
+ ret void
+}
diff --git a/test/CodeGen/ARM/select_xform.ll b/test/CodeGen/ARM/select_xform.ll
index 5dabfc3a82a3..4211797ef77e 100644
--- a/test/CodeGen/ARM/select_xform.ll
+++ b/test/CodeGen/ARM/select_xform.ll
@@ -4,7 +4,7 @@
define i32 @t1(i32 %a, i32 %b, i32 %c) nounwind {
; ARM: t1:
-; ARM: sub r0, r1, #6, 2
+; ARM: sub r0, r1, #6, #2
; ARM: movgt r0, r1
; T2: t1:
diff --git a/test/CodeGen/ARM/shifter_operand.ll b/test/CodeGen/ARM/shifter_operand.ll
index 01e3a922f656..f0e2d102610d 100644
--- a/test/CodeGen/ARM/shifter_operand.ll
+++ b/test/CodeGen/ARM/shifter_operand.ll
@@ -51,19 +51,19 @@ entry:
declare i8* @malloc(...)
-define fastcc void @test4() nounwind {
+define fastcc void @test4(i16 %addr) nounwind {
entry:
; A8: test4:
-; A8: ldr r1, [r0, r0, lsl #2]
-; A8: str r1, [r0, r0, lsl #2]
+; A8: ldr r2, [r0, r1, lsl #2]
+; A8: str r2, [r0, r1, lsl #2]
; A9: test4:
-; A9: add r0, r0, r0, lsl #2
+; A9: add r0, r0, r{{[0-9]+}}, lsl #2
; A9: ldr r1, [r0]
; A9: str r1, [r0]
%0 = tail call i8* (...)* @malloc(i32 undef) nounwind
%1 = bitcast i8* %0 to i32*
- %2 = sext i16 undef to i32
+ %2 = sext i16 %addr to i32
%3 = getelementptr inbounds i32* %1, i32 %2
%4 = load i32* %3, align 4
%5 = add nsw i32 %4, 1
diff --git a/test/CodeGen/ARM/shuffle.ll b/test/CodeGen/ARM/shuffle.ll
new file mode 100644
index 000000000000..7d6be4f5e6c3
--- /dev/null
+++ b/test/CodeGen/ARM/shuffle.ll
@@ -0,0 +1,18 @@
+; RUN: llc < %s -mtriple=thumbv7-apple-darwin -relocation-model=pic -disable-fp-elim | FileCheck %s
+
+target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:64:64-v128:128:128-a0:0:32-n32"
+target triple = "thumbv7-apple-darwin"
+
+define <8 x i8> @shuf(<8 x i8> %a) nounwind readnone optsize ssp {
+entry:
+; CHECK: vtbl
+ %shuffle = shufflevector <8 x i8> %a, <8 x i8> undef, <8 x i32> <i32 3, i32 1, i32 2, i32 0, i32 4, i32 4, i32 5, i32 0>
+ ret <8 x i8> %shuffle
+}
+
+define <8 x i8> @shuf2(<8 x i8> %a, <8 x i8> %b) nounwind readnone optsize ssp {
+entry:
+; CHECK: vtbl
+ %shuffle = shufflevector <8 x i8> %a, <8 x i8> %b, <8 x i32> <i32 3, i32 1, i32 2, i32 0, i32 4, i32 4, i32 5, i32 8>
+ ret <8 x i8> %shuffle
+}
diff --git a/test/CodeGen/ARM/smul.ll b/test/CodeGen/ARM/smul.ll
index b7ab2e796f8a..686d791ce60d 100644
--- a/test/CodeGen/ARM/smul.ll
+++ b/test/CodeGen/ARM/smul.ll
@@ -1,16 +1,12 @@
-; RUN: llc < %s -march=arm
-; RUN: llc < %s -march=arm -mattr=+v5TE
-; RUN: llc < %s -march=arm -mattr=+v5TE | \
-; RUN: grep smulbt | count 1
-; RUN: llc < %s -march=arm -mattr=+v5TE | \
-; RUN: grep smultt | count 1
-; RUN: llc < %s -march=arm -mattr=+v5TE | \
-; RUN: grep smlabt | count 1
+; RUN: llc < %s -march=arm -mcpu=generic
+; RUN: llc < %s -march=arm -mcpu=cortex-a8 | FileCheck %s
@x = weak global i16 0 ; <i16*> [#uses=1]
@y = weak global i16 0 ; <i16*> [#uses=0]
define i32 @f1(i32 %y) {
+; CHECK: f1
+; CHECK: smulbt
%tmp = load i16* @x ; <i16> [#uses=1]
%tmp1 = add i16 %tmp, 2 ; <i16> [#uses=1]
%tmp2 = sext i16 %tmp1 to i32 ; <i32> [#uses=1]
@@ -20,6 +16,8 @@ define i32 @f1(i32 %y) {
}
define i32 @f2(i32 %x, i32 %y) {
+; CHECK: f2
+; CHECK: smultt
%tmp1 = ashr i32 %x, 16 ; <i32> [#uses=1]
%tmp3 = ashr i32 %y, 16 ; <i32> [#uses=1]
%tmp4 = mul i32 %tmp3, %tmp1 ; <i32> [#uses=1]
@@ -27,6 +25,8 @@ define i32 @f2(i32 %x, i32 %y) {
}
define i32 @f3(i32 %a, i16 %x, i32 %y) {
+; CHECK: f3
+; CHECK: smlabt
%tmp = sext i16 %x to i32 ; <i32> [#uses=1]
%tmp2 = ashr i32 %y, 16 ; <i32> [#uses=1]
%tmp3 = mul i32 %tmp2, %tmp ; <i32> [#uses=1]
diff --git a/test/CodeGen/ARM/str_pre-2.ll b/test/CodeGen/ARM/str_pre-2.ll
index 465c7e676c56..b24f75a6e2b8 100644
--- a/test/CodeGen/ARM/str_pre-2.ll
+++ b/test/CodeGen/ARM/str_pre-2.ll
@@ -1,4 +1,7 @@
-; RUN: llc < %s -mtriple=armv6-linux-gnu | FileCheck %s
+; RUN: llc < %s -mtriple=armv6-linux-gnu -regalloc=linearscan | FileCheck %s
+; RUN: llc < %s -mtriple=armv6-linux-gnu -regalloc=basic | FileCheck %s
+
+; The greedy register allocator uses a single CSR here, invalidating the test.
@b = external global i64*
diff --git a/test/CodeGen/ARM/sub.ll b/test/CodeGen/ARM/sub.ll
index 81513e23e807..555b18eb1e99 100644
--- a/test/CodeGen/ARM/sub.ll
+++ b/test/CodeGen/ARM/sub.ll
@@ -12,7 +12,7 @@ define i64 @f1(i64 %a) {
; 66846720 = 0x03fc0000
define i64 @f2(i64 %a) {
; CHECK: f2
-; CHECK: subs r0, r0, #255, 14
+; CHECK: subs r0, r0, #255, #14
; CHECK: sbc r1, r1, #0
%tmp = sub i64 %a, 66846720
ret i64 %tmp
@@ -27,3 +27,12 @@ define i64 @f3(i64 %a) {
ret i64 %tmp
}
+define i32 @f4(i32 %x) {
+entry:
+; CHECK: f4
+; CHECK: rsbs
+ %sub = sub i32 1, %x
+ %cmp = icmp ugt i32 %sub, 0
+ %sel = select i1 %cmp, i32 1, i32 %sub
+ ret i32 %sel
+}
diff --git a/test/CodeGen/ARM/thumb1-varalloc.ll b/test/CodeGen/ARM/thumb1-varalloc.ll
index 25093fee225a..aa88ae0c1a86 100644
--- a/test/CodeGen/ARM/thumb1-varalloc.ll
+++ b/test/CodeGen/ARM/thumb1-varalloc.ll
@@ -1,4 +1,5 @@
; RUN: llc < %s -mtriple=thumbv6-apple-darwin | FileCheck %s
+; RUN: llc < %s -mtriple=thumbv6-apple-darwin -regalloc=basic | FileCheck %s
; rdar://8819685
@__bar = external hidden global i8*
@@ -12,12 +13,13 @@ entry:
%0 = load i8** @__bar, align 4
%1 = icmp eq i8* %0, null
br i1 %1, label %bb1, label %bb3
+; CHECK: bne
bb1:
store i32 1026, i32* %size, align 4
%2 = alloca [1026 x i8], align 1
-; CHECK: mov r0, sp
-; CHECK: adds r4, r0, r4
+; CHECK: mov [[R0:r[0-9]+]], sp
+; CHECK: adds {{r[0-9]+}}, [[R0]], {{r[0-9]+}}
%3 = getelementptr inbounds [1026 x i8]* %2, i32 0, i32 0
%4 = call i32 @_called_func(i8* %3, i32* %size) nounwind
%5 = icmp eq i32 %4, 0
diff --git a/test/CodeGen/ARM/trap.ll b/test/CodeGen/ARM/trap.ll
index b2f6b6e69fa5..38842a9646ff 100644
--- a/test/CodeGen/ARM/trap.ll
+++ b/test/CodeGen/ARM/trap.ll
@@ -1,10 +1,15 @@
-; RUN: llc < %s -march=arm | FileCheck %s
+; RUN: llc < %s -mtriple=arm-apple-darwin | FileCheck %s -check-prefix=INSTR
+; RUN: llc < %s -mtriple=arm-apple-darwin -trap-func=_trap | FileCheck %s -check-prefix=FUNC
; rdar://7961298
+; rdar://9249183
define void @t() nounwind {
entry:
-; CHECK: t:
-; CHECK: trap
+; INSTR: t:
+; INSTR: trap
+
+; FUNC: t:
+; FUNC: bl __trap
call void @llvm.trap()
unreachable
}
diff --git a/test/CodeGen/ARM/umulo-32.ll b/test/CodeGen/ARM/umulo-32.ll
index aa7d28a62349..fa5c0168fefe 100644
--- a/test/CodeGen/ARM/umulo-32.ll
+++ b/test/CodeGen/ARM/umulo-32.ll
@@ -12,3 +12,30 @@ define i32 @func(i32 %a) nounwind {
}
declare %umul.ty @llvm.umul.with.overflow.i32(i32, i32) nounwind readnone
+
+define i32 @f(i32 %argc, i8** %argv) ssp {
+; CHECK: func
+; CHECK: str r0
+; CHECK: movs r2
+; CHECK: mov r1
+; CHECK: mov r3
+; CHECK: muldi3
+%1 = alloca i32, align 4
+%2 = alloca i32, align 4
+%3 = alloca i8**, align 4
+%m_degree = alloca i32, align 4
+store i32 0, i32* %1
+store i32 %argc, i32* %2, align 4
+store i8** %argv, i8*** %3, align 4
+store i32 10, i32* %m_degree, align 4
+%4 = load i32* %m_degree, align 4
+%5 = call %umul.ty @llvm.umul.with.overflow.i32(i32 %4, i32 8)
+%6 = extractvalue %umul.ty %5, 1
+%7 = extractvalue %umul.ty %5, 0
+%8 = select i1 %6, i32 -1, i32 %7
+%9 = call noalias i8* @_Znam(i32 %8)
+%10 = bitcast i8* %9 to double*
+ret i32 0
+}
+
+declare noalias i8* @_Znam(i32)
diff --git a/test/CodeGen/ARM/unaligned_load_store.ll b/test/CodeGen/ARM/unaligned_load_store.ll
index b42e11f2c4ab..a8237c60e4e0 100644
--- a/test/CodeGen/ARM/unaligned_load_store.ll
+++ b/test/CodeGen/ARM/unaligned_load_store.ll
@@ -8,14 +8,14 @@
define void @t(i8* nocapture %a, i8* nocapture %b) nounwind {
entry:
; GENERIC: t:
-; GENERIC: ldrb r2
-; GENERIC: ldrb r3
-; GENERIC: ldrb r12
-; GENERIC: ldrb r1
-; GENERIC: strb r1
-; GENERIC: strb r12
-; GENERIC: strb r3
-; GENERIC: strb r2
+; GENERIC: ldrb [[R2:r[0-9]+]]
+; GENERIC: ldrb [[R3:r[0-9]+]]
+; GENERIC: ldrb [[R12:r[0-9]+]]
+; GENERIC: ldrb [[R1:r[0-9]+]]
+; GENERIC: strb [[R1]]
+; GENERIC: strb [[R12]]
+; GENERIC: strb [[R3]]
+; GENERIC: strb [[R2]]
; DARWIN_V6: t:
; DARWIN_V6: ldr r1
diff --git a/test/CodeGen/ARM/undef-sext.ll b/test/CodeGen/ARM/undef-sext.ll
new file mode 100644
index 000000000000..2c28da3b6461
--- /dev/null
+++ b/test/CodeGen/ARM/undef-sext.ll
@@ -0,0 +1,14 @@
+; RUN: llc < %s -mtriple=armv7-apple-darwin -mcpu=cortex-a8 | FileCheck %s
+
+; No need to sign-extend undef.
+
+define i32 @t(i32* %a) nounwind {
+entry:
+; CHECK: t:
+; CHECK: ldr r0, [r0]
+; CHECK: bx lr
+ %0 = sext i16 undef to i32
+ %1 = getelementptr inbounds i32* %a, i32 %0
+ %2 = load i32* %1, align 4
+ ret i32 %2
+}
diff --git a/test/CodeGen/ARM/va_arg.ll b/test/CodeGen/ARM/va_arg.ll
index 7cb976236dc5..bb4045311624 100644
--- a/test/CodeGen/ARM/va_arg.ll
+++ b/test/CodeGen/ARM/va_arg.ll
@@ -1,10 +1,10 @@
-; RUN: llc < %s -mtriple=armv7-none-linux-gnueabi | FileCheck %s
+; RUN: llc < %s -mtriple=armv7-none-linux-gnueabi -pre-RA-sched=source | FileCheck %s
; Test that we correctly align elements when using va_arg
; CHECK: test1:
; CHECK-NOT: bfc
-; CHECK: add r0, r0, #7
-; CHECK: bfc r0, #0, #3
+; CHECK: add [[REG:(r[0-9]+)|(lr)]], {{(r[0-9]+)|(lr)}}, #7
+; CHECK: bfc [[REG]], #0, #3
; CHECK-NOT: bfc
define i64 @test1(i32 %i, ...) nounwind optsize {
@@ -19,8 +19,8 @@ entry:
; CHECK: test2:
; CHECK-NOT: bfc
-; CHECK: add r0, r0, #7
-; CHECK: bfc r0, #0, #3
+; CHECK: add [[REG:(r[0-9]+)|(lr)]], {{(r[0-9]+)|(lr)}}, #7
+; CHECK: bfc [[REG]], #0, #3
; CHECK-NOT: bfc
; CHECK: bx lr
diff --git a/test/CodeGen/ARM/vbsl-constant.ll b/test/CodeGen/ARM/vbsl-constant.ll
new file mode 100644
index 000000000000..14e668efb1da
--- /dev/null
+++ b/test/CodeGen/ARM/vbsl-constant.ll
@@ -0,0 +1,115 @@
+; RUN: llc < %s -march=arm -mattr=+neon | FileCheck %s
+
+define <8 x i8> @v_bsli8(<8 x i8>* %A, <8 x i8>* %B, <8 x i8>* %C) nounwind {
+;CHECK: v_bsli8:
+;CHECK: vldr.64
+;CHECK: vldr.64
+;CHECK: vbsl
+ %tmp1 = load <8 x i8>* %A
+ %tmp2 = load <8 x i8>* %B
+ %tmp3 = load <8 x i8>* %C
+ %tmp4 = and <8 x i8> %tmp1, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>
+ %tmp6 = and <8 x i8> %tmp3, <i8 -4, i8 -4, i8 -4, i8 -4, i8 -4, i8 -4, i8 -4, i8 -4>
+ %tmp7 = or <8 x i8> %tmp4, %tmp6
+ ret <8 x i8> %tmp7
+}
+
+define <4 x i16> @v_bsli16(<4 x i16>* %A, <4 x i16>* %B, <4 x i16>* %C) nounwind {
+;CHECK: v_bsli16:
+;CHECK: vldr.64
+;CHECK: vldr.64
+;CHECK: vbsl
+ %tmp1 = load <4 x i16>* %A
+ %tmp2 = load <4 x i16>* %B
+ %tmp3 = load <4 x i16>* %C
+ %tmp4 = and <4 x i16> %tmp1, <i16 3, i16 3, i16 3, i16 3>
+ %tmp6 = and <4 x i16> %tmp3, <i16 -4, i16 -4, i16 -4, i16 -4>
+ %tmp7 = or <4 x i16> %tmp4, %tmp6
+ ret <4 x i16> %tmp7
+}
+
+define <2 x i32> @v_bsli32(<2 x i32>* %A, <2 x i32>* %B, <2 x i32>* %C) nounwind {
+;CHECK: v_bsli32:
+;CHECK: vldr.64
+;CHECK: vldr.64
+;CHECK: vbsl
+ %tmp1 = load <2 x i32>* %A
+ %tmp2 = load <2 x i32>* %B
+ %tmp3 = load <2 x i32>* %C
+ %tmp4 = and <2 x i32> %tmp1, <i32 3, i32 3>
+ %tmp6 = and <2 x i32> %tmp3, <i32 -4, i32 -4>
+ %tmp7 = or <2 x i32> %tmp4, %tmp6
+ ret <2 x i32> %tmp7
+}
+
+define <1 x i64> @v_bsli64(<1 x i64>* %A, <1 x i64>* %B, <1 x i64>* %C) nounwind {
+;CHECK: v_bsli64:
+;CHECK: vldr.64
+;CHECK: vldr.64
+;CHECK: vldr.64
+;CHECK: vbsl
+ %tmp1 = load <1 x i64>* %A
+ %tmp2 = load <1 x i64>* %B
+ %tmp3 = load <1 x i64>* %C
+ %tmp4 = and <1 x i64> %tmp1, <i64 3>
+ %tmp6 = and <1 x i64> %tmp3, <i64 -4>
+ %tmp7 = or <1 x i64> %tmp4, %tmp6
+ ret <1 x i64> %tmp7
+}
+
+define <16 x i8> @v_bslQi8(<16 x i8>* %A, <16 x i8>* %B, <16 x i8>* %C) nounwind {
+;CHECK: v_bslQi8:
+;CHECK: vldmia
+;CHECK: vldmia
+;CHECK: vbsl
+ %tmp1 = load <16 x i8>* %A
+ %tmp2 = load <16 x i8>* %B
+ %tmp3 = load <16 x i8>* %C
+ %tmp4 = and <16 x i8> %tmp1, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>
+ %tmp6 = and <16 x i8> %tmp3, <i8 -4, i8 -4, i8 -4, i8 -4, i8 -4, i8 -4, i8 -4, i8 -4, i8 -4, i8 -4, i8 -4, i8 -4, i8 -4, i8 -4, i8 -4, i8 -4>
+ %tmp7 = or <16 x i8> %tmp4, %tmp6
+ ret <16 x i8> %tmp7
+}
+
+define <8 x i16> @v_bslQi16(<8 x i16>* %A, <8 x i16>* %B, <8 x i16>* %C) nounwind {
+;CHECK: v_bslQi16:
+;CHECK: vldmia
+;CHECK: vldmia
+;CHECK: vbsl
+ %tmp1 = load <8 x i16>* %A
+ %tmp2 = load <8 x i16>* %B
+ %tmp3 = load <8 x i16>* %C
+ %tmp4 = and <8 x i16> %tmp1, <i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3>
+ %tmp6 = and <8 x i16> %tmp3, <i16 -4, i16 -4, i16 -4, i16 -4, i16 -4, i16 -4, i16 -4, i16 -4>
+ %tmp7 = or <8 x i16> %tmp4, %tmp6
+ ret <8 x i16> %tmp7
+}
+
+define <4 x i32> @v_bslQi32(<4 x i32>* %A, <4 x i32>* %B, <4 x i32>* %C) nounwind {
+;CHECK: v_bslQi32:
+;CHECK: vldmia
+;CHECK: vldmia
+;CHECK: vbsl
+ %tmp1 = load <4 x i32>* %A
+ %tmp2 = load <4 x i32>* %B
+ %tmp3 = load <4 x i32>* %C
+ %tmp4 = and <4 x i32> %tmp1, <i32 3, i32 3, i32 3, i32 3>
+ %tmp6 = and <4 x i32> %tmp3, <i32 -4, i32 -4, i32 -4, i32 -4>
+ %tmp7 = or <4 x i32> %tmp4, %tmp6
+ ret <4 x i32> %tmp7
+}
+
+define <2 x i64> @v_bslQi64(<2 x i64>* %A, <2 x i64>* %B, <2 x i64>* %C) nounwind {
+;CHECK: v_bslQi64:
+;CHECK: vldmia
+;CHECK: vldmia
+;CHECK: vldmia
+;CHECK: vbsl
+ %tmp1 = load <2 x i64>* %A
+ %tmp2 = load <2 x i64>* %B
+ %tmp3 = load <2 x i64>* %C
+ %tmp4 = and <2 x i64> %tmp1, <i64 3, i64 3>
+ %tmp6 = and <2 x i64> %tmp3, <i64 -4, i64 -4>
+ %tmp7 = or <2 x i64> %tmp4, %tmp6
+ ret <2 x i64> %tmp7
+}
diff --git a/test/CodeGen/ARM/vcgt.ll b/test/CodeGen/ARM/vcgt.ll
index c3c4cb356307..2243bac91fb1 100644
--- a/test/CodeGen/ARM/vcgt.ll
+++ b/test/CodeGen/ARM/vcgt.ll
@@ -1,4 +1,5 @@
; RUN: llc < %s -march=arm -mattr=+neon | FileCheck %s
+; RUN: llc < %s -march=arm -mattr=+neon -regalloc=basic | FileCheck %s
define <8 x i8> @vcgts8(<8 x i8>* %A, <8 x i8>* %B) nounwind {
;CHECK: vcgts8:
@@ -161,9 +162,9 @@ define <4 x i32> @vacgtQf32(<4 x float>* %A, <4 x float>* %B) nounwind {
; rdar://7923010
define <4 x i32> @vcgt_zext(<4 x float>* %A, <4 x float>* %B) nounwind {
;CHECK: vcgt_zext:
-;CHECK: vmov.i32 q10, #0x1
-;CHECK: vcgt.f32 q8
-;CHECK: vand q8, q8, q10
+;CHECK: vmov.i32 [[Q0:q[0-9]+]], #0x1
+;CHECK: vcgt.f32 [[Q1:q[0-9]+]]
+;CHECK: vand [[Q2:q[0-9]+]], [[Q1]], [[Q0]]
%tmp1 = load <4 x float>* %A
%tmp2 = load <4 x float>* %B
%tmp3 = fcmp ogt <4 x float> %tmp1, %tmp2
diff --git a/test/CodeGen/ARM/vector-DAGCombine.ll b/test/CodeGen/ARM/vector-DAGCombine.ll
index 3ab0cfcbbc77..81bdc44863b7 100644
--- a/test/CodeGen/ARM/vector-DAGCombine.ll
+++ b/test/CodeGen/ARM/vector-DAGCombine.ll
@@ -105,3 +105,21 @@ define void @i64_extractelement(i64* %ptr, <2 x i64>* %vp) nounwind {
store i64 %t1, i64* %ptr
ret void
}
+
+; Test trying to do a AND Combine on illegal types.
+define void @andVec(<3 x i8>* %A) nounwind {
+ %tmp = load <3 x i8>* %A, align 4
+ %and = and <3 x i8> %tmp, <i8 7, i8 7, i8 7>
+ store <3 x i8> %and, <3 x i8>* %A
+ ret void
+}
+
+
+; Test trying to do an OR Combine on illegal types.
+define void @orVec(<3 x i8>* %A) nounwind {
+ %tmp = load <3 x i8>* %A, align 4
+ %or = or <3 x i8> %tmp, <i8 7, i8 7, i8 7>
+ store <3 x i8> %or, <3 x i8>* %A
+ ret void
+}
+
diff --git a/test/CodeGen/ARM/vext.ll b/test/CodeGen/ARM/vext.ll
index 55abefef0fa7..49a042b7e1f5 100644
--- a/test/CodeGen/ARM/vext.ll
+++ b/test/CodeGen/ARM/vext.ll
@@ -125,11 +125,11 @@ define <4 x i16> @test_largespan(<8 x i16>* %B) nounwind {
; The actual shuffle code only handles some cases, make sure we check
; this rather than blindly emitting a VECTOR_SHUFFLE (infinite
; lowering loop can result otherwise).
-define <8 x i8> @test_illegal(<16 x i8>* %A, <16 x i8>* %B) nounwind {
+define <8 x i16> @test_illegal(<8 x i16>* %A, <8 x i16>* %B) nounwind {
;CHECK: test_illegal:
-;CHECK: vst1.8
- %tmp1 = load <16 x i8>* %A
- %tmp2 = load <16 x i8>* %B
- %tmp3 = shufflevector <16 x i8> %tmp1, <16 x i8> %tmp2, <8 x i32> <i32 0, i32 7, i32 5, i32 25, i32 3, i32 2, i32 2, i32 26>
- ret <8 x i8> %tmp3
+;CHECK: vst1.16
+ %tmp1 = load <8 x i16>* %A
+ %tmp2 = load <8 x i16>* %B
+ %tmp3 = shufflevector <8 x i16> %tmp1, <8 x i16> %tmp2, <8 x i32> <i32 0, i32 7, i32 5, i32 13, i32 3, i32 2, i32 2, i32 9>
+ ret <8 x i16> %tmp3
}
diff --git a/test/CodeGen/ARM/vfp.ll b/test/CodeGen/ARM/vfp.ll
index 44a44afe9af4..49a69827bc05 100644
--- a/test/CodeGen/ARM/vfp.ll
+++ b/test/CodeGen/ARM/vfp.ll
@@ -1,4 +1,5 @@
-; RUN: llc < %s -march=arm -mattr=+vfp2 | FileCheck %s
+; RUN: llc < %s -march=arm -mattr=+vfp2 -disable-post-ra | FileCheck %s
+; RUN: llc < %s -march=arm -mattr=+vfp2 -disable-post-ra -regalloc=basic | FileCheck %s
define void @test(float* %P, double* %D) {
%A = load float* %P ; <float> [#uses=1]
@@ -40,9 +41,9 @@ define void @test_ext_round(float* %P, double* %D) {
;CHECK: test_ext_round:
%a = load float* %P ; <float> [#uses=1]
;CHECK: vcvt.f64.f32
+;CHECK: vcvt.f32.f64
%b = fpext float %a to double ; <double> [#uses=1]
%A = load double* %D ; <double> [#uses=1]
-;CHECK: vcvt.f32.f64
%B = fptrunc double %A to float ; <float> [#uses=1]
store double %b, double* %D
store float %B, float* %P
diff --git a/test/CodeGen/ARM/vld1.ll b/test/CodeGen/ARM/vld1.ll
index c886125a2fb0..e524395c501a 100644
--- a/test/CodeGen/ARM/vld1.ll
+++ b/test/CodeGen/ARM/vld1.ll
@@ -1,4 +1,5 @@
; RUN: llc < %s -march=arm -mattr=+neon | FileCheck %s
+; RUN: llc < %s -march=arm -mattr=+neon -regalloc=basic | FileCheck %s
define <8 x i8> @vld1i8(i8* %A) nounwind {
;CHECK: vld1i8:
@@ -19,7 +20,7 @@ define <4 x i16> @vld1i16(i16* %A) nounwind {
;Check for a post-increment updating load.
define <4 x i16> @vld1i16_update(i16** %ptr) nounwind {
;CHECK: vld1i16_update:
-;CHECK: vld1.16 {d16}, [r1]!
+;CHECK: vld1.16 {d16}, [{{r[0-9]+}}]!
%A = load i16** %ptr
%tmp0 = bitcast i16* %A to i8*
%tmp1 = call <4 x i16> @llvm.arm.neon.vld1.v4i16(i8* %tmp0, i32 1)
@@ -39,7 +40,7 @@ define <2 x i32> @vld1i32(i32* %A) nounwind {
;Check for a post-increment updating load with register increment.
define <2 x i32> @vld1i32_update(i32** %ptr, i32 %inc) nounwind {
;CHECK: vld1i32_update:
-;CHECK: vld1.32 {d16}, [r2], r1
+;CHECK: vld1.32 {d16}, [{{r[0-9]+}}], {{r[0-9]+}}
%A = load i32** %ptr
%tmp0 = bitcast i32* %A to i8*
%tmp1 = call <2 x i32> @llvm.arm.neon.vld1.v2i32(i8* %tmp0, i32 1)
@@ -75,7 +76,7 @@ define <16 x i8> @vld1Qi8(i8* %A) nounwind {
;Check for a post-increment updating load.
define <16 x i8> @vld1Qi8_update(i8** %ptr) nounwind {
;CHECK: vld1Qi8_update:
-;CHECK: vld1.8 {d16, d17}, [r1, :64]!
+;CHECK: vld1.8 {d16, d17}, [{{r[0-9]+}}, :64]!
%A = load i8** %ptr
%tmp1 = call <16 x i8> @llvm.arm.neon.vld1.v16i8(i8* %A, i32 8)
%tmp2 = getelementptr i8* %A, i32 16
@@ -132,8 +133,6 @@ declare <2 x i64> @llvm.arm.neon.vld1.v2i64(i8*, i32) nounwind readonly
; Do not crash if the vld1 result is not used.
define void @unused_vld1_result() {
entry:
-;CHECK: unused_vld1_result
-;CHECK: vld1.32
%0 = call <4 x float> @llvm.arm.neon.vld1.v4f32(i8* undef, i32 1)
call void @llvm.trap()
unreachable
diff --git a/test/CodeGen/ARM/vld3.ll b/test/CodeGen/ARM/vld3.ll
index dde530f6df1f..b495319830b0 100644
--- a/test/CodeGen/ARM/vld3.ll
+++ b/test/CodeGen/ARM/vld3.ll
@@ -1,4 +1,5 @@
; RUN: llc < %s -march=arm -mattr=+neon | FileCheck %s
+; RUN: llc < %s -march=arm -mattr=+neon -regalloc=basic | FileCheck %s
%struct.__neon_int8x8x3_t = type { <8 x i8>, <8 x i8>, <8 x i8> }
%struct.__neon_int16x4x3_t = type { <4 x i16>, <4 x i16>, <4 x i16> }
@@ -36,7 +37,7 @@ define <4 x i16> @vld3i16(i16* %A) nounwind {
;Check for a post-increment updating load with register increment.
define <4 x i16> @vld3i16_update(i16** %ptr, i32 %inc) nounwind {
;CHECK: vld3i16_update:
-;CHECK: vld3.16 {d16, d17, d18}, [r2], r1
+;CHECK: vld3.16 {d16, d17, d18}, [{{r[0-9]+}}], {{r[0-9]+}}
%A = load i16** %ptr
%tmp0 = bitcast i16* %A to i8*
%tmp1 = call %struct.__neon_int16x4x3_t @llvm.arm.neon.vld3.v4i16(i8* %tmp0, i32 1)
@@ -121,8 +122,8 @@ define <4 x i32> @vld3Qi32(i32* %A) nounwind {
;Check for a post-increment updating load.
define <4 x i32> @vld3Qi32_update(i32** %ptr) nounwind {
;CHECK: vld3Qi32_update:
-;CHECK: vld3.32 {d16, d18, d20}, [r1]!
-;CHECK: vld3.32 {d17, d19, d21}, [r1]!
+;CHECK: vld3.32 {d16, d18, d20}, [r[[R:[0-9]+]]]!
+;CHECK: vld3.32 {d17, d19, d21}, [r[[R]]]!
%A = load i32** %ptr
%tmp0 = bitcast i32* %A to i8*
%tmp1 = call %struct.__neon_int32x4x3_t @llvm.arm.neon.vld3.v4i32(i8* %tmp0, i32 1)
diff --git a/test/CodeGen/ARM/vldlane.ll b/test/CodeGen/ARM/vldlane.ll
index 770ed071ac12..805aad51d4fd 100644
--- a/test/CodeGen/ARM/vldlane.ll
+++ b/test/CodeGen/ARM/vldlane.ll
@@ -1,4 +1,5 @@
; RUN: llc < %s -march=arm -mattr=+neon | FileCheck %s
+; RUN: llc < %s -march=arm -mattr=+neon -regalloc=basic | FileCheck %s
define <8 x i8> @vld1lanei8(i8* %A, <8 x i8>* %B) nounwind {
;CHECK: vld1lanei8:
@@ -279,7 +280,7 @@ define <8 x i16> @vld3laneQi16(i16* %A, <8 x i16>* %B) nounwind {
;Check for a post-increment updating load with register increment.
define <8 x i16> @vld3laneQi16_update(i16** %ptr, <8 x i16>* %B, i32 %inc) nounwind {
;CHECK: vld3laneQi16_update:
-;CHECK: vld3.16 {d16[1], d18[1], d20[1]}, [r2], r1
+;CHECK: vld3.16 {d16[1], d18[1], d20[1]}, [{{r[0-9]+}}], {{r[0-9]+}}
%A = load i16** %ptr
%tmp0 = bitcast i16* %A to i8*
%tmp1 = load <8 x i16>* %B
@@ -490,7 +491,7 @@ declare %struct.__neon_float32x4x4_t @llvm.arm.neon.vld4lane.v4f32(i8*, <4 x flo
; in the QPR_VFP2 regclass, it needs to be copied to a QPR regclass because
; we don't currently have a QQQQ_VFP2 super-regclass. (The "0" for the low
; part of %ins67 is supposed to be loaded by a VLDRS instruction in this test.)
-define void @test_qqqq_regsequence_subreg([6 x i64] %b) nounwind {
+define <8 x i16> @test_qqqq_regsequence_subreg([6 x i64] %b) nounwind {
;CHECK: test_qqqq_regsequence_subreg
;CHECK: vld3.16
%tmp63 = extractvalue [6 x i64] %b, 5
@@ -499,8 +500,12 @@ define void @test_qqqq_regsequence_subreg([6 x i64] %b) nounwind {
%ins67 = or i128 %tmp65, 0
%tmp78 = bitcast i128 %ins67 to <8 x i16>
%vld3_lane = tail call %struct.__neon_int16x8x3_t @llvm.arm.neon.vld3lane.v8i16(i8* undef, <8 x i16> undef, <8 x i16> undef, <8 x i16> %tmp78, i32 1, i32 2)
- call void @llvm.trap()
- unreachable
+ %tmp3 = extractvalue %struct.__neon_int16x8x3_t %vld3_lane, 0
+ %tmp4 = extractvalue %struct.__neon_int16x8x3_t %vld3_lane, 1
+ %tmp5 = extractvalue %struct.__neon_int16x8x3_t %vld3_lane, 2
+ %tmp6 = add <8 x i16> %tmp3, %tmp4
+ %tmp7 = add <8 x i16> %tmp5, %tmp6
+ ret <8 x i16> %tmp7
}
declare void @llvm.trap() nounwind
diff --git a/test/CodeGen/ARM/vmul.ll b/test/CodeGen/ARM/vmul.ll
index ee033caa00d0..1fd6581ae081 100644
--- a/test/CodeGen/ARM/vmul.ll
+++ b/test/CodeGen/ARM/vmul.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -march=arm -mattr=+neon | FileCheck %s
+; RUN: llc < %s -march=arm -mcpu=cortex-a8 | FileCheck %s
define <8 x i8> @vmuli8(<8 x i8>* %A, <8 x i8>* %B) nounwind {
;CHECK: vmuli8:
@@ -158,6 +158,15 @@ define <8 x i16> @vmulls8(<8 x i8>* %A, <8 x i8>* %B) nounwind {
ret <8 x i16> %tmp5
}
+define <8 x i16> @vmulls8_int(<8 x i8>* %A, <8 x i8>* %B) nounwind {
+;CHECK: vmulls8_int:
+;CHECK: vmull.s8
+ %tmp1 = load <8 x i8>* %A
+ %tmp2 = load <8 x i8>* %B
+ %tmp3 = call <8 x i16> @llvm.arm.neon.vmulls.v8i16(<8 x i8> %tmp1, <8 x i8> %tmp2)
+ ret <8 x i16> %tmp3
+}
+
define <4 x i32> @vmulls16(<4 x i16>* %A, <4 x i16>* %B) nounwind {
;CHECK: vmulls16:
;CHECK: vmull.s16
@@ -169,6 +178,15 @@ define <4 x i32> @vmulls16(<4 x i16>* %A, <4 x i16>* %B) nounwind {
ret <4 x i32> %tmp5
}
+define <4 x i32> @vmulls16_int(<4 x i16>* %A, <4 x i16>* %B) nounwind {
+;CHECK: vmulls16_int:
+;CHECK: vmull.s16
+ %tmp1 = load <4 x i16>* %A
+ %tmp2 = load <4 x i16>* %B
+ %tmp3 = call <4 x i32> @llvm.arm.neon.vmulls.v4i32(<4 x i16> %tmp1, <4 x i16> %tmp2)
+ ret <4 x i32> %tmp3
+}
+
define <2 x i64> @vmulls32(<2 x i32>* %A, <2 x i32>* %B) nounwind {
;CHECK: vmulls32:
;CHECK: vmull.s32
@@ -180,6 +198,15 @@ define <2 x i64> @vmulls32(<2 x i32>* %A, <2 x i32>* %B) nounwind {
ret <2 x i64> %tmp5
}
+define <2 x i64> @vmulls32_int(<2 x i32>* %A, <2 x i32>* %B) nounwind {
+;CHECK: vmulls32_int:
+;CHECK: vmull.s32
+ %tmp1 = load <2 x i32>* %A
+ %tmp2 = load <2 x i32>* %B
+ %tmp3 = call <2 x i64> @llvm.arm.neon.vmulls.v2i64(<2 x i32> %tmp1, <2 x i32> %tmp2)
+ ret <2 x i64> %tmp3
+}
+
define <8 x i16> @vmullu8(<8 x i8>* %A, <8 x i8>* %B) nounwind {
;CHECK: vmullu8:
;CHECK: vmull.u8
@@ -191,6 +218,15 @@ define <8 x i16> @vmullu8(<8 x i8>* %A, <8 x i8>* %B) nounwind {
ret <8 x i16> %tmp5
}
+define <8 x i16> @vmullu8_int(<8 x i8>* %A, <8 x i8>* %B) nounwind {
+;CHECK: vmullu8_int:
+;CHECK: vmull.u8
+ %tmp1 = load <8 x i8>* %A
+ %tmp2 = load <8 x i8>* %B
+ %tmp3 = call <8 x i16> @llvm.arm.neon.vmullu.v8i16(<8 x i8> %tmp1, <8 x i8> %tmp2)
+ ret <8 x i16> %tmp3
+}
+
define <4 x i32> @vmullu16(<4 x i16>* %A, <4 x i16>* %B) nounwind {
;CHECK: vmullu16:
;CHECK: vmull.u16
@@ -202,6 +238,15 @@ define <4 x i32> @vmullu16(<4 x i16>* %A, <4 x i16>* %B) nounwind {
ret <4 x i32> %tmp5
}
+define <4 x i32> @vmullu16_int(<4 x i16>* %A, <4 x i16>* %B) nounwind {
+;CHECK: vmullu16_int:
+;CHECK: vmull.u16
+ %tmp1 = load <4 x i16>* %A
+ %tmp2 = load <4 x i16>* %B
+ %tmp3 = call <4 x i32> @llvm.arm.neon.vmullu.v4i32(<4 x i16> %tmp1, <4 x i16> %tmp2)
+ ret <4 x i32> %tmp3
+}
+
define <2 x i64> @vmullu32(<2 x i32>* %A, <2 x i32>* %B) nounwind {
;CHECK: vmullu32:
;CHECK: vmull.u32
@@ -213,6 +258,15 @@ define <2 x i64> @vmullu32(<2 x i32>* %A, <2 x i32>* %B) nounwind {
ret <2 x i64> %tmp5
}
+define <2 x i64> @vmullu32_int(<2 x i32>* %A, <2 x i32>* %B) nounwind {
+;CHECK: vmullu32_int:
+;CHECK: vmull.u32
+ %tmp1 = load <2 x i32>* %A
+ %tmp2 = load <2 x i32>* %B
+ %tmp3 = call <2 x i64> @llvm.arm.neon.vmullu.v2i64(<2 x i32> %tmp1, <2 x i32> %tmp2)
+ ret <2 x i64> %tmp3
+}
+
define <8 x i16> @vmullp8(<8 x i8>* %A, <8 x i8>* %B) nounwind {
;CHECK: vmullp8:
;CHECK: vmull.p8
@@ -233,6 +287,15 @@ entry:
ret <4 x i32> %3
}
+define arm_aapcs_vfpcc <4 x i32> @test_vmull_lanes16_int(<4 x i16> %arg0_int16x4_t, <4 x i16> %arg1_int16x4_t) nounwind readnone {
+entry:
+; CHECK: test_vmull_lanes16_int
+; CHECK: vmull.s16 q0, d0, d1[1]
+ %0 = shufflevector <4 x i16> %arg1_int16x4_t, <4 x i16> undef, <4 x i32> <i32 1, i32 1, i32 1, i32 1> ; <<4 x i16>> [#uses=1]
+ %1 = tail call <4 x i32> @llvm.arm.neon.vmulls.v4i32(<4 x i16> %arg0_int16x4_t, <4 x i16> %0) ; <<4 x i32>> [#uses=1]
+ ret <4 x i32> %1
+}
+
define arm_aapcs_vfpcc <2 x i64> @test_vmull_lanes32(<2 x i32> %arg0_int32x2_t, <2 x i32> %arg1_int32x2_t) nounwind readnone {
entry:
; CHECK: test_vmull_lanes32
@@ -244,6 +307,15 @@ entry:
ret <2 x i64> %3
}
+define arm_aapcs_vfpcc <2 x i64> @test_vmull_lanes32_int(<2 x i32> %arg0_int32x2_t, <2 x i32> %arg1_int32x2_t) nounwind readnone {
+entry:
+; CHECK: test_vmull_lanes32_int
+; CHECK: vmull.s32 q0, d0, d1[1]
+ %0 = shufflevector <2 x i32> %arg1_int32x2_t, <2 x i32> undef, <2 x i32> <i32 1, i32 1> ; <<2 x i32>> [#uses=1]
+ %1 = tail call <2 x i64> @llvm.arm.neon.vmulls.v2i64(<2 x i32> %arg0_int32x2_t, <2 x i32> %0) ; <<2 x i64>> [#uses=1]
+ ret <2 x i64> %1
+}
+
define arm_aapcs_vfpcc <4 x i32> @test_vmull_laneu16(<4 x i16> %arg0_uint16x4_t, <4 x i16> %arg1_uint16x4_t) nounwind readnone {
entry:
; CHECK: test_vmull_laneu16
@@ -255,6 +327,15 @@ entry:
ret <4 x i32> %3
}
+define arm_aapcs_vfpcc <4 x i32> @test_vmull_laneu16_int(<4 x i16> %arg0_uint16x4_t, <4 x i16> %arg1_uint16x4_t) nounwind readnone {
+entry:
+; CHECK: test_vmull_laneu16_int
+; CHECK: vmull.u16 q0, d0, d1[1]
+ %0 = shufflevector <4 x i16> %arg1_uint16x4_t, <4 x i16> undef, <4 x i32> <i32 1, i32 1, i32 1, i32 1> ; <<4 x i16>> [#uses=1]
+ %1 = tail call <4 x i32> @llvm.arm.neon.vmullu.v4i32(<4 x i16> %arg0_uint16x4_t, <4 x i16> %0) ; <<4 x i32>> [#uses=1]
+ ret <4 x i32> %1
+}
+
define arm_aapcs_vfpcc <2 x i64> @test_vmull_laneu32(<2 x i32> %arg0_uint32x2_t, <2 x i32> %arg1_uint32x2_t) nounwind readnone {
entry:
; CHECK: test_vmull_laneu32
@@ -266,6 +347,23 @@ entry:
ret <2 x i64> %3
}
+define arm_aapcs_vfpcc <2 x i64> @test_vmull_laneu32_int(<2 x i32> %arg0_uint32x2_t, <2 x i32> %arg1_uint32x2_t) nounwind readnone {
+entry:
+; CHECK: test_vmull_laneu32_int
+; CHECK: vmull.u32 q0, d0, d1[1]
+ %0 = shufflevector <2 x i32> %arg1_uint32x2_t, <2 x i32> undef, <2 x i32> <i32 1, i32 1> ; <<2 x i32>> [#uses=1]
+ %1 = tail call <2 x i64> @llvm.arm.neon.vmullu.v2i64(<2 x i32> %arg0_uint32x2_t, <2 x i32> %0) ; <<2 x i64>> [#uses=1]
+ ret <2 x i64> %1
+}
+
+declare <8 x i16> @llvm.arm.neon.vmulls.v8i16(<8 x i8>, <8 x i8>) nounwind readnone
+declare <4 x i32> @llvm.arm.neon.vmulls.v4i32(<4 x i16>, <4 x i16>) nounwind readnone
+declare <2 x i64> @llvm.arm.neon.vmulls.v2i64(<2 x i32>, <2 x i32>) nounwind readnone
+
+declare <8 x i16> @llvm.arm.neon.vmullu.v8i16(<8 x i8>, <8 x i8>) nounwind readnone
+declare <4 x i32> @llvm.arm.neon.vmullu.v4i32(<4 x i16>, <4 x i16>) nounwind readnone
+declare <2 x i64> @llvm.arm.neon.vmullu.v2i64(<2 x i32>, <2 x i32>) nounwind readnone
+
declare <8 x i16> @llvm.arm.neon.vmullp.v8i16(<8 x i8>, <8 x i8>) nounwind readnone
@@ -339,3 +437,58 @@ define <2 x i64> @vmull_extvec_u32(<2 x i32> %arg) nounwind {
%tmp4 = mul <2 x i64> %tmp3, <i64 1234, i64 1234>
ret <2 x i64> %tmp4
}
+
+; rdar://9197392
+define void @distribue(i16* %dst, i8* %src, i32 %mul) nounwind {
+entry:
+; CHECK: distribue:
+; CHECK: vmull.u8 [[REG1:(q[0-9]+)]], d{{.*}}, [[REG2:(d[0-9]+)]]
+; CHECK: vmlal.u8 [[REG1]], d{{.*}}, [[REG2]]
+ %0 = trunc i32 %mul to i8
+ %1 = insertelement <8 x i8> undef, i8 %0, i32 0
+ %2 = shufflevector <8 x i8> %1, <8 x i8> undef, <8 x i32> zeroinitializer
+ %3 = tail call <16 x i8> @llvm.arm.neon.vld1.v16i8(i8* %src, i32 1)
+ %4 = bitcast <16 x i8> %3 to <2 x double>
+ %5 = extractelement <2 x double> %4, i32 1
+ %6 = bitcast double %5 to <8 x i8>
+ %7 = zext <8 x i8> %6 to <8 x i16>
+ %8 = zext <8 x i8> %2 to <8 x i16>
+ %9 = extractelement <2 x double> %4, i32 0
+ %10 = bitcast double %9 to <8 x i8>
+ %11 = zext <8 x i8> %10 to <8 x i16>
+ %12 = add <8 x i16> %7, %11
+ %13 = mul <8 x i16> %12, %8
+ %14 = bitcast i16* %dst to i8*
+ tail call void @llvm.arm.neon.vst1.v8i16(i8* %14, <8 x i16> %13, i32 2)
+ ret void
+}
+
+declare <16 x i8> @llvm.arm.neon.vld1.v16i8(i8*, i32) nounwind readonly
+
+declare void @llvm.arm.neon.vst1.v8i16(i8*, <8 x i16>, i32) nounwind
+
+; Take advantage of the Cortex-A8 multiplier accumulator forward.
+
+%struct.uint8x8_t = type { <8 x i8> }
+
+define void @distribue2(%struct.uint8x8_t* nocapture %dst, i8* %src, i32 %mul) nounwind {
+entry:
+; CHECK: distribue2
+; CHECK-NOT: vadd.i8
+; CHECK: vmul.i8
+; CHECK: vmla.i8
+ %0 = trunc i32 %mul to i8
+ %1 = insertelement <8 x i8> undef, i8 %0, i32 0
+ %2 = shufflevector <8 x i8> %1, <8 x i8> undef, <8 x i32> zeroinitializer
+ %3 = tail call <16 x i8> @llvm.arm.neon.vld1.v16i8(i8* %src, i32 1)
+ %4 = bitcast <16 x i8> %3 to <2 x double>
+ %5 = extractelement <2 x double> %4, i32 1
+ %6 = bitcast double %5 to <8 x i8>
+ %7 = extractelement <2 x double> %4, i32 0
+ %8 = bitcast double %7 to <8 x i8>
+ %9 = add <8 x i8> %6, %8
+ %10 = mul <8 x i8> %9, %2
+ %11 = getelementptr inbounds %struct.uint8x8_t* %dst, i32 0, i32 0
+ store <8 x i8> %10, <8 x i8>* %11, align 8
+ ret void
+}
diff --git a/test/CodeGen/ARM/vst3.ll b/test/CodeGen/ARM/vst3.ll
index d262303bc60e..e3372a03793d 100644
--- a/test/CodeGen/ARM/vst3.ll
+++ b/test/CodeGen/ARM/vst3.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -march=arm -mattr=+neon -O0 | FileCheck %s
+; RUN: llc < %s -march=arm -mattr=+neon -disable-arm-fast-isel -O0 | FileCheck %s
define void @vst3i8(i8* %A, <8 x i8>* %B) nounwind {
;CHECK: vst3i8:
diff --git a/test/CodeGen/Blackfin/2009-08-04-LowerExtract-Live.ll b/test/CodeGen/Blackfin/2009-08-04-LowerExtract-Live.ll
index 3ee5e8df9972..50fccb440990 100644
--- a/test/CodeGen/Blackfin/2009-08-04-LowerExtract-Live.ll
+++ b/test/CodeGen/Blackfin/2009-08-04-LowerExtract-Live.ll
@@ -1,4 +1,5 @@
; RUN: llc < %s -march=bfin -join-liveintervals=0 -verify-machineinstrs
+; RUN: llc < %s -march=bfin -join-liveintervals=0 -verify-machineinstrs -regalloc=greedy
; Provoke an error in LowerSubregsPass::LowerExtract where the live range of a
; super-register is illegally extended.
diff --git a/test/CodeGen/CellSPU/jumptable.ll b/test/CodeGen/CellSPU/jumptable.ll
index 42b41b3bf29b..87376ef6ed53 100644
--- a/test/CodeGen/CellSPU/jumptable.ll
+++ b/test/CodeGen/CellSPU/jumptable.ll
@@ -1,4 +1,4 @@
-;RUN: llc --march=cellspu %s -o - | FileCheck %s
+;RUN: llc --march=cellspu -disable-cgp-branch-opts %s -o - | FileCheck %s
; This is to check that emitting jumptables doesn't crash llc
define i32 @test(i32 %param) {
entry:
diff --git a/test/CodeGen/CellSPU/loads.ll b/test/CodeGen/CellSPU/loads.ll
index 03d7ad1153a1..4771752f5f4c 100644
--- a/test/CodeGen/CellSPU/loads.ll
+++ b/test/CodeGen/CellSPU/loads.ll
@@ -50,3 +50,10 @@ define i32 @load_misaligned( i32* %ptr ){
%rv = load i32* %ptr, align 2
ret i32 %rv
}
+
+define <4 x i32> @load_null_vec( ) {
+;CHECK: lqa
+;CHECK: bi $lr
+ %rv = load <4 x i32>* null
+ ret <4 x i32> %rv
+}
diff --git a/test/CodeGen/CellSPU/rotate_ops.ll b/test/CodeGen/CellSPU/rotate_ops.ll
index e1172089c703..b1219e6f56e5 100644
--- a/test/CodeGen/CellSPU/rotate_ops.ll
+++ b/test/CodeGen/CellSPU/rotate_ops.ll
@@ -3,9 +3,9 @@
; RUN: grep roth %t1.s | count 8
; RUN: grep roti.*5 %t1.s | count 1
; RUN: grep roti.*27 %t1.s | count 1
-; RUN grep rothi.*5 %t1.s | count 2
-; RUN grep rothi.*11 %t1.s | count 1
-; RUN grep rothi.*,.3 %t1.s | count 1
+; RUN: grep rothi.*5 %t1.s | count 2
+; RUN: grep rothi.*11 %t1.s | count 1
+; RUN: grep rothi.*,.3 %t1.s | count 1
; RUN: grep andhi %t1.s | count 4
; RUN: grep shlhi %t1.s | count 4
; RUN: cat %t1.s | FileCheck %s
diff --git a/test/CodeGen/CellSPU/shift_ops.ll b/test/CodeGen/CellSPU/shift_ops.ll
index 92390abf9465..c4a5abd29042 100644
--- a/test/CodeGen/CellSPU/shift_ops.ll
+++ b/test/CodeGen/CellSPU/shift_ops.ll
@@ -1,7 +1,7 @@
; RUN: llc < %s -march=cellspu > %t1.s
-; RUN: grep {shlh } %t1.s | count 9
+; RUN: grep {shlh } %t1.s | count 10
; RUN: grep {shlhi } %t1.s | count 3
-; RUN: grep {shl } %t1.s | count 9
+; RUN: grep {shl } %t1.s | count 11
; RUN: grep {shli } %t1.s | count 3
; RUN: grep {xshw } %t1.s | count 5
; RUN: grep {and } %t1.s | count 14
@@ -14,15 +14,12 @@
; RUN: grep {rotqbyi } %t1.s | count 1
; RUN: grep {rotqbii } %t1.s | count 2
; RUN: grep {rotqbybi } %t1.s | count 1
-; RUN: grep {sfi } %t1.s | count 4
+; RUN: grep {sfi } %t1.s | count 6
; RUN: cat %t1.s | FileCheck %s
target datalayout = "E-p:32:32:128-f64:64:128-f32:32:128-i64:32:128-i32:32:128-i16:16:128-i8:8:128-i1:8:128-a0:0:128-v128:128:128-s0:128:128"
target triple = "spu"
-; Vector shifts are not currently supported in gcc or llvm assembly. These are
-; not tested.
-
; Shift left i16 via register, note that the second operand to shl is promoted
; to a 32-bit type:
@@ -293,3 +290,55 @@ define i128 @test_lshr_i128( i128 %val ) {
%rv = lshr i128 %val, 64
ret i128 %rv
}
+
+;Vector shifts
+define <2 x i32> @shl_v2i32(<2 x i32> %val, <2 x i32> %sh) {
+;CHECK: shl
+;CHECK: bi $lr
+ %rv = shl <2 x i32> %val, %sh
+ ret <2 x i32> %rv
+}
+
+define <4 x i32> @shl_v4i32(<4 x i32> %val, <4 x i32> %sh) {
+;CHECK: shl
+;CHECK: bi $lr
+ %rv = shl <4 x i32> %val, %sh
+ ret <4 x i32> %rv
+}
+
+define <8 x i16> @shl_v8i16(<8 x i16> %val, <8 x i16> %sh) {
+;CHECK: shlh
+;CHECK: bi $lr
+ %rv = shl <8 x i16> %val, %sh
+ ret <8 x i16> %rv
+}
+
+define <4 x i32> @lshr_v4i32(<4 x i32> %val, <4 x i32> %sh) {
+;CHECK: rotm
+;CHECK: bi $lr
+ %rv = lshr <4 x i32> %val, %sh
+ ret <4 x i32> %rv
+}
+
+define <8 x i16> @lshr_v8i16(<8 x i16> %val, <8 x i16> %sh) {
+;CHECK: sfhi
+;CHECK: rothm
+;CHECK: bi $lr
+ %rv = lshr <8 x i16> %val, %sh
+ ret <8 x i16> %rv
+}
+
+define <4 x i32> @ashr_v4i32(<4 x i32> %val, <4 x i32> %sh) {
+;CHECK: rotma
+;CHECK: bi $lr
+ %rv = ashr <4 x i32> %val, %sh
+ ret <4 x i32> %rv
+}
+
+define <8 x i16> @ashr_v8i16(<8 x i16> %val, <8 x i16> %sh) {
+;CHECK: sfhi
+;CHECK: rotmah
+;CHECK: bi $lr
+ %rv = ashr <8 x i16> %val, %sh
+ ret <8 x i16> %rv
+}
diff --git a/test/CodeGen/CellSPU/stores.ll b/test/CodeGen/CellSPU/stores.ll
index 7e0bf06b4e45..6ca5b0892304 100644
--- a/test/CodeGen/CellSPU/stores.ll
+++ b/test/CodeGen/CellSPU/stores.ll
@@ -171,3 +171,11 @@ define void @store_v8( <8 x float> %val, <8 x float>* %ptr )
store <8 x float> %val, <8 x float>* %ptr
ret void
}
+
+define void @store_null_vec( <4 x i32> %val ) {
+; FIXME - this is for some reason compiled into a il+stqd, not a sta.
+;CHECK: stqd
+;CHECK: bi $lr
+ store <4 x i32> %val, <4 x i32>* null
+ ret void
+}
diff --git a/test/CodeGen/CellSPU/v2f32.ll b/test/CodeGen/CellSPU/v2f32.ll
index efd032031002..09e15ffbc75d 100644
--- a/test/CodeGen/CellSPU/v2f32.ll
+++ b/test/CodeGen/CellSPU/v2f32.ll
@@ -33,6 +33,7 @@ define %vec @test_mul(%vec %param)
ret %vec %1
}
+; CHECK: test_splat:
define %vec @test_splat(float %param ) {
;CHECK: lqa
;CHECK: shufb
@@ -43,16 +44,17 @@ define %vec @test_splat(float %param ) {
}
define void @test_store(%vec %val, %vec* %ptr){
-
+; CHECK: test_store:
;CHECK: stqd
- store %vec undef, %vec* null
+ store %vec zeroinitializer, %vec* null
-;CHECK: stqd $3, 0(${{.}})
+;CHECK: stqd $3, 0(${{.*}})
;CHECK: bi $lr
store %vec %val, %vec* %ptr
ret void
}
+; CHECK: test_insert:
define %vec @test_insert(){
;CHECK: cwd
;CHECK: shufb $3
@@ -61,6 +63,8 @@ define %vec @test_insert(){
ret %vec %rv
}
+; CHECK: test_unaligned_store:
+
define void @test_unaligned_store() {
;CHECK: cdd
;CHECK: shufb
@@ -68,7 +72,7 @@ define void @test_unaligned_store() {
%data = alloca [4 x float], align 16 ; <[4 x float]*> [#uses=1]
%ptr = getelementptr [4 x float]* %data, i32 0, i32 2 ; <float*> [#uses=1]
%vptr = bitcast float* %ptr to <2 x float>* ; <[1 x <2 x float>]*> [#uses=1]
- store <2 x float> undef, <2 x float>* %vptr
+ store <2 x float> zeroinitializer, <2 x float>* %vptr
ret void
}
diff --git a/test/CodeGen/Generic/crash.ll b/test/CodeGen/Generic/crash.ll
index 042739884df7..e7cc7e339406 100644
--- a/test/CodeGen/Generic/crash.ll
+++ b/test/CodeGen/Generic/crash.ll
@@ -38,3 +38,31 @@ unreachable
declare void @Parse_Vector(double*)
declare i32 @llvm.objectsize.i32(i8*, i1)
+
+; PR9578
+%struct.S0 = type { i32, i8, i32 }
+
+define void @func_82() nounwind optsize {
+entry:
+ br label %for.body.i
+
+for.body.i: ; preds = %for.body.i, %entry
+ br i1 undef, label %func_74.exit.for.cond29.thread_crit_edge, label %for.body.i
+
+func_74.exit.for.cond29.thread_crit_edge: ; preds = %for.body.i
+ %f13576.pre = getelementptr inbounds %struct.S0* undef, i64 0, i32 1
+ store i8 0, i8* %f13576.pre, align 4, !tbaa !0
+ br label %lbl_468
+
+lbl_468: ; preds = %lbl_468, %func_74.exit.for.cond29.thread_crit_edge
+ %f13577.ph = phi i8* [ %f13576.pre, %func_74.exit.for.cond29.thread_crit_edge ], [ %f135.pre, %lbl_468 ]
+ store i8 1, i8* %f13577.ph, align 1
+ %f135.pre = getelementptr inbounds %struct.S0* undef, i64 0, i32 1
+ br i1 undef, label %lbl_468, label %for.end74
+
+for.end74: ; preds = %lbl_468
+ ret void
+}
+
+!0 = metadata !{metadata !"omnipotent char", metadata !1}
+!1 = metadata !{metadata !"Simple C/C++ TBAA", null}
diff --git a/test/CodeGen/MBlaze/fsl.ll b/test/CodeGen/MBlaze/fsl.ll
index f9c6205bc19f..5444f82dd63c 100644
--- a/test/CodeGen/MBlaze/fsl.ll
+++ b/test/CodeGen/MBlaze/fsl.ll
@@ -3,7 +3,7 @@
; dynamic version of the instructions and that constant values use the
; constant version of the instructions.
;
-; RUN: llc < %s -march=mblaze | FileCheck %s
+; RUN: llc -O3 < %s -march=mblaze | FileCheck %s
declare i32 @llvm.mblaze.fsl.get(i32 %port)
declare i32 @llvm.mblaze.fsl.aget(i32 %port)
@@ -55,8 +55,7 @@ declare void @llvm.mblaze.fsl.tnaput(i32 %port)
declare void @llvm.mblaze.fsl.tncput(i32 %port)
declare void @llvm.mblaze.fsl.tncaput(i32 %port)
-define i32 @fsl_get(i32 %port)
-{
+define void @fsl_get(i32 %port) {
; CHECK: fsl_get:
%v0 = call i32 @llvm.mblaze.fsl.get(i32 %port)
; CHECK: getd
@@ -122,12 +121,11 @@ define i32 @fsl_get(i32 %port)
; CHECK-NEXT: tnecgetd
%v31 = call i32 @llvm.mblaze.fsl.tnecaget(i32 %port)
; CHECK-NEXT: tnecagetd
- ret i32 1
+ ret void
; CHECK: rtsd
}
-define i32 @fslc_get()
-{
+define void @fslc_get() {
; CHECK: fslc_get:
%v0 = call i32 @llvm.mblaze.fsl.get(i32 1)
; CHECK: get
@@ -224,12 +222,11 @@ define i32 @fslc_get()
%v31 = call i32 @llvm.mblaze.fsl.tnecaget(i32 1)
; CHECK-NOT: tnecagetd
; CHECK: tnecaget
- ret i32 1
+ ret void
; CHECK: rtsd
}
-define void @putfsl(i32 %value, i32 %port)
-{
+define void @putfsl(i32 %value, i32 %port) {
; CHECK: putfsl:
call void @llvm.mblaze.fsl.put(i32 %value, i32 %port)
; CHECK: putd
@@ -267,8 +264,7 @@ define void @putfsl(i32 %value, i32 %port)
; CHECK: rtsd
}
-define void @putfsl_const(i32 %value)
-{
+define void @putfsl_const(i32 %value) {
; CHECK: putfsl_const:
call void @llvm.mblaze.fsl.put(i32 %value, i32 1)
; CHECK-NOT: putd
diff --git a/test/CodeGen/MBlaze/loop.ll b/test/CodeGen/MBlaze/loop.ll
index 8973f75aa1dc..7439d0b6fe22 100644
--- a/test/CodeGen/MBlaze/loop.ll
+++ b/test/CodeGen/MBlaze/loop.ll
@@ -29,14 +29,12 @@ loop_inner_finish:
%inner.5 = add i32 %inner.2, 1
call i32 (i8*,...)* @printf( i8* getelementptr([19 x i8]* @MSG,i32 0,i32 0),
i32 %inner.0, i32 %inner.1, i32 %inner.2 )
- ; CHECK: brlid
- ; CHECK: addik {{.*, 1}}
%inner.6 = icmp eq i32 %inner.5, 100
- ; CHECK: cmp
+ ; CHECK: cmp [[REG:r[0-9]*]]
br i1 %inner.6, label %loop_inner, label %loop_outer_finish
- ; CHECK: {{beq|bne}}
+ ; CHECK: {{beqid|bneid}} [[REG]]
loop_outer_finish:
%outer.1 = add i32 %outer.0, 1
diff --git a/test/CodeGen/Mips/2008-07-22-Cstpool.ll b/test/CodeGen/Mips/2008-07-22-Cstpool.ll
index 20bd88889061..94dfe35faba1 100644
--- a/test/CodeGen/Mips/2008-07-22-Cstpool.ll
+++ b/test/CodeGen/Mips/2008-07-22-Cstpool.ll
@@ -1,6 +1,6 @@
; RUN: llc < %s -march=mips -o %t
; RUN: grep {CPI\[01\]_\[01\]:} %t | count 2
-; RUN: grep {rodata.cst4,"aM",@progbits} %t | count 1
+; RUN: grep {.rodata.cst4,"aM",@progbits} %t | count 1
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64"
target triple = "mipsallegrexel-unknown-psp-elf"
diff --git a/test/CodeGen/Mips/2008-07-23-fpcmp.ll b/test/CodeGen/Mips/2008-07-23-fpcmp.ll
index ca837ffd2a50..519e4b93a72b 100644
--- a/test/CodeGen/Mips/2008-07-23-fpcmp.ll
+++ b/test/CodeGen/Mips/2008-07-23-fpcmp.ll
@@ -2,6 +2,10 @@
; RUN: grep {c\\..*\\.s} %t | count 3
; RUN: grep {bc1\[tf\]} %t | count 3
+; FIXME: Disabled because branch instructions are generated where
+; conditional move instructions are expected.
+; REQUIRES: disabled
+
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64"
target triple = "mipsallegrexel-unknown-psp-elf"
diff --git a/test/CodeGen/Mips/2008-07-29-icmp.ll b/test/CodeGen/Mips/2008-07-29-icmp.ll
index 52a4b081ddb3..e85a749f7dcd 100644
--- a/test/CodeGen/Mips/2008-07-29-icmp.ll
+++ b/test/CodeGen/Mips/2008-07-29-icmp.ll
@@ -1,5 +1,9 @@
; RUN: llc < %s -march=mips | grep {b\[ne\]\[eq\]} | count 1
+; FIXME: Disabled because branch instructions are generated where
+; conditional move instructions are expected.
+; REQUIRES: disabled
+
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64"
target triple = "mipsallegrexel-unknown-psp-elf"
diff --git a/test/CodeGen/Mips/2008-08-06-Alloca.ll b/test/CodeGen/Mips/2008-08-06-Alloca.ll
index 7be7974e0ffe..6dd4af111cd9 100644
--- a/test/CodeGen/Mips/2008-08-06-Alloca.ll
+++ b/test/CodeGen/Mips/2008-08-06-Alloca.ll
@@ -1,4 +1,5 @@
; RUN: llc < %s -march=mips | grep {subu.*sp} | count 2
+; RUN: llc < %s -march=mips -regalloc=basic | grep {subu.*sp} | count 2
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64"
target triple = "mipsallegrexel-unknown-psp-elf"
diff --git a/test/CodeGen/Mips/2010-07-20-Select.ll b/test/CodeGen/Mips/2010-07-20-Select.ll
index 891b5d9e1884..e5e2c5473770 100644
--- a/test/CodeGen/Mips/2010-07-20-Select.ll
+++ b/test/CodeGen/Mips/2010-07-20-Select.ll
@@ -1,4 +1,5 @@
; RUN: llc < %s -march=mips -relocation-model=static | FileCheck %s
+; RUN: llc < %s -march=mips -relocation-model=static -regalloc=basic | FileCheck %s
; Fix PR7473
define i32 @main() nounwind readnone {
@@ -9,12 +10,12 @@ entry:
volatile store i32 0, i32* %c, align 4
%0 = volatile load i32* %a, align 4 ; <i32> [#uses=1]
%1 = icmp eq i32 %0, 0 ; <i1> [#uses=1]
-; CHECK: addiu $3, $zero, 0
+; CHECK: addiu $[[R1:[0-9]+]], $zero, 0
%iftmp.0.0 = select i1 %1, i32 3, i32 0 ; <i32> [#uses=1]
%2 = volatile load i32* %c, align 4 ; <i32> [#uses=1]
%3 = icmp eq i32 %2, 0 ; <i1> [#uses=1]
-; CHECK: addiu $3, $zero, 3
-; CHECK: addu $2, $5, $3
+; CHECK: addiu $[[R1]], $zero, 3
+; CHECK: addu $2, ${{.}}, $[[R1]]
%iftmp.2.0 = select i1 %3, i32 0, i32 5 ; <i32> [#uses=1]
%4 = add nsw i32 %iftmp.2.0, %iftmp.0.0 ; <i32> [#uses=1]
ret i32 %4
diff --git a/test/CodeGen/Mips/addc.ll b/test/CodeGen/Mips/addc.ll
new file mode 100644
index 000000000000..e5d05b1d6dbb
--- /dev/null
+++ b/test/CodeGen/Mips/addc.ll
@@ -0,0 +1,13 @@
+; RUN: llc < %s -march=mipsel | FileCheck %s
+; RUN: llc < %s -march=mips | FileCheck %s
+
+define void @f(i64 %l, i64* nocapture %p) nounwind {
+entry:
+; CHECK: lui
+; CHECK: ori
+; CHECK: addu
+ %add = add i64 %l, 1311768467294899695
+ store i64 %add, i64* %p, align 4
+ ret void
+}
+
diff --git a/test/CodeGen/Mips/analyzebranch.ll b/test/CodeGen/Mips/analyzebranch.ll
new file mode 100644
index 000000000000..8f0bdf286c52
--- /dev/null
+++ b/test/CodeGen/Mips/analyzebranch.ll
@@ -0,0 +1,46 @@
+; RUN: llc -march=mips < %s | FileCheck %s
+
+define double @foo(double %a, double %b) nounwind readnone {
+entry:
+; CHECK: bc1f $BB0_2
+; CHECK: nop
+; CHECK: # BB#1:
+
+ %cmp = fcmp ogt double %a, 0.000000e+00
+ br i1 %cmp, label %if.end6, label %if.else
+
+if.else: ; preds = %entry
+ %cmp3 = fcmp ogt double %b, 0.000000e+00
+ br i1 %cmp3, label %if.end6, label %return
+
+if.end6: ; preds = %if.else, %entry
+ %c.0 = phi double [ %a, %entry ], [ 0.000000e+00, %if.else ]
+ %sub = fsub double %b, %c.0
+ %mul = fmul double %sub, 2.000000e+00
+ br label %return
+
+return: ; preds = %if.else, %if.end6
+ %retval.0 = phi double [ %mul, %if.end6 ], [ 0.000000e+00, %if.else ]
+ ret double %retval.0
+}
+
+define void @f1(float %f) nounwind {
+entry:
+; CHECK: bc1t $BB1_2
+; CHECK: nop
+; CHECK: # BB#1:
+ %cmp = fcmp une float %f, 0.000000e+00
+ br i1 %cmp, label %if.then, label %if.end
+
+if.then: ; preds = %entry
+ tail call void @abort() noreturn
+ unreachable
+
+if.end: ; preds = %entry
+ tail call void (...)* @f2() nounwind
+ ret void
+}
+
+declare void @abort() noreturn nounwind
+
+declare void @f2(...)
diff --git a/test/CodeGen/Mips/blockaddr.ll b/test/CodeGen/Mips/blockaddr.ll
new file mode 100644
index 000000000000..e9af3045e15f
--- /dev/null
+++ b/test/CodeGen/Mips/blockaddr.ll
@@ -0,0 +1,31 @@
+; RUN: llc -march=mipsel -relocation-model=pic < %s | FileCheck %s -check-prefix=CHECK-PIC
+; RUN: llc -march=mipsel -relocation-model=static < %s | FileCheck %s -check-prefix=CHECK-STATIC
+
+@reg = common global i8* null, align 4
+
+define i8* @dummy(i8* %x) nounwind readnone noinline {
+entry:
+ ret i8* %x
+}
+
+; CHECK-PIC: lw $[[R0:[0-9]+]], %got($tmp1)($gp)
+; CHECK-PIC: addiu ${{[0-9]+}}, $[[R0]], %lo($tmp1)
+; CHECK-PIC: lw $[[R1:[0-9]+]], %got($tmp2)($gp)
+; CHECK-PIC: addiu ${{[0-9]+}}, $[[R1]], %lo($tmp2)
+; CHECK-STATIC: lui $[[R2:[0-9]+]], %hi($tmp1)
+; CHECK-STATIC: addiu ${{[0-9]+}}, $[[R2]], %lo($tmp1)
+; CHECK-STATIC: lui $[[R3:[0-9]+]], %hi($tmp2)
+; CHECK-STATIC: addiu ${{[0-9]+}}, $[[R3]], %lo($tmp2)
+define void @f() nounwind {
+entry:
+ %call = tail call i8* @dummy(i8* blockaddress(@f, %baz))
+ indirectbr i8* %call, [label %baz, label %foo]
+
+foo: ; preds = %foo, %entry
+ store i8* blockaddress(@f, %foo), i8** @reg, align 4
+ br label %foo
+
+baz: ; preds = %entry
+ store i8* null, i8** @reg, align 4
+ ret void
+}
diff --git a/test/CodeGen/Mips/buildpairextractelementf64.ll b/test/CodeGen/Mips/buildpairextractelementf64.ll
new file mode 100644
index 000000000000..585bc250fb8c
--- /dev/null
+++ b/test/CodeGen/Mips/buildpairextractelementf64.ll
@@ -0,0 +1,23 @@
+; RUN: llc < %s -march=mipsel | FileCheck %s
+; RUN: llc < %s -march=mips | FileCheck %s
+@a = external global i32
+
+define double @f(i32 %a1, double %d) nounwind {
+entry:
+; CHECK: mtc1
+; CHECK: mtc1
+ store i32 %a1, i32* @a, align 4
+ %add = fadd double %d, 2.000000e+00
+ ret double %add
+}
+
+define void @f3(double %d, i32 %a1) nounwind {
+entry:
+; CHECK: mfc1
+; CHECK: mfc1
+ tail call void @f2(i32 %a1, double %d) nounwind
+ ret void
+}
+
+declare void @f2(i32, double)
+
diff --git a/test/CodeGen/Mips/cmov.ll b/test/CodeGen/Mips/cmov.ll
index 7d3e0252e3c9..8329c891f0c2 100755
--- a/test/CodeGen/Mips/cmov.ll
+++ b/test/CodeGen/Mips/cmov.ll
@@ -1,10 +1,11 @@
; RUN: llc -march=mips -mcpu=4ke < %s | FileCheck %s
+; RUN: llc -march=mips -mcpu=4ke -regalloc=basic < %s | FileCheck %s
@i1 = global [3 x i32] [i32 1, i32 2, i32 3], align 4
@i3 = common global i32* null, align 4
-; CHECK: lw $3, %got(i3)($gp)
-; CHECK: addiu $5, $gp, %got(i1)
+; CHECK: lw ${{[0-9]+}}, %got(i3)($gp)
+; CHECK: addiu ${{[0-9]+}}, $gp, %got(i1)
define i32* @cmov1(i32 %s) nounwind readonly {
entry:
%tobool = icmp ne i32 %s, 0
diff --git a/test/CodeGen/Mips/divrem.ll b/test/CodeGen/Mips/divrem.ll
new file mode 100644
index 000000000000..398d1b78bd43
--- /dev/null
+++ b/test/CodeGen/Mips/divrem.ll
@@ -0,0 +1,51 @@
+; RUN: llc -march=mips < %s | FileCheck %s
+
+; CHECK: div $zero,
+define i32 @sdiv1(i32 %a0, i32 %a1) nounwind readnone {
+entry:
+ %div = sdiv i32 %a0, %a1
+ ret i32 %div
+}
+
+; CHECK: div $zero,
+define i32 @srem1(i32 %a0, i32 %a1) nounwind readnone {
+entry:
+ %rem = srem i32 %a0, %a1
+ ret i32 %rem
+}
+
+; CHECK: divu $zero,
+define i32 @udiv1(i32 %a0, i32 %a1) nounwind readnone {
+entry:
+ %div = udiv i32 %a0, %a1
+ ret i32 %div
+}
+
+; CHECK: divu $zero,
+define i32 @urem1(i32 %a0, i32 %a1) nounwind readnone {
+entry:
+ %rem = urem i32 %a0, %a1
+ ret i32 %rem
+}
+
+; CHECK: div $zero,
+define i32 @sdivrem1(i32 %a0, i32 %a1, i32* nocapture %r) nounwind {
+entry:
+ %rem = srem i32 %a0, %a1
+ store i32 %rem, i32* %r, align 4, !tbaa !0
+ %div = sdiv i32 %a0, %a1
+ ret i32 %div
+}
+
+; CHECK: divu $zero,
+define i32 @udivrem1(i32 %a0, i32 %a1, i32* nocapture %r) nounwind {
+entry:
+ %rem = urem i32 %a0, %a1
+ store i32 %rem, i32* %r, align 4, !tbaa !0
+ %div = udiv i32 %a0, %a1
+ ret i32 %div
+}
+
+!0 = metadata !{metadata !"int", metadata !1}
+!1 = metadata !{metadata !"omnipotent char", metadata !2}
+!2 = metadata !{metadata !"Simple C/C++ TBAA", null}
diff --git a/test/CodeGen/Mips/fpbr.ll b/test/CodeGen/Mips/fpbr.ll
new file mode 100644
index 000000000000..0a6478b0f8f0
--- /dev/null
+++ b/test/CodeGen/Mips/fpbr.ll
@@ -0,0 +1,119 @@
+; RUN: llc < %s -march=mipsel | FileCheck %s
+
+define void @func0(float %f2, float %f3) nounwind {
+entry:
+; CHECK: c.eq.s
+; CHECK: bc1f
+ %cmp = fcmp oeq float %f2, %f3
+ br i1 %cmp, label %if.then, label %if.else
+
+if.then: ; preds = %entry
+ tail call void (...)* @g0() nounwind
+ br label %if.end
+
+if.else: ; preds = %entry
+ tail call void (...)* @g1() nounwind
+ br label %if.end
+
+if.end: ; preds = %if.else, %if.then
+ ret void
+}
+
+declare void @g0(...)
+
+declare void @g1(...)
+
+define void @func1(float %f2, float %f3) nounwind {
+entry:
+; CHECK: c.olt.s
+; CHECK: bc1f
+ %cmp = fcmp olt float %f2, %f3
+ br i1 %cmp, label %if.then, label %if.else
+
+if.then: ; preds = %entry
+ tail call void (...)* @g0() nounwind
+ br label %if.end
+
+if.else: ; preds = %entry
+ tail call void (...)* @g1() nounwind
+ br label %if.end
+
+if.end: ; preds = %if.else, %if.then
+ ret void
+}
+
+define void @func2(float %f2, float %f3) nounwind {
+entry:
+; CHECK: c.ole.s
+; CHECK: bc1f
+ %cmp = fcmp ugt float %f2, %f3
+ br i1 %cmp, label %if.else, label %if.then
+
+if.then: ; preds = %entry
+ tail call void (...)* @g0() nounwind
+ br label %if.end
+
+if.else: ; preds = %entry
+ tail call void (...)* @g1() nounwind
+ br label %if.end
+
+if.end: ; preds = %if.else, %if.then
+ ret void
+}
+
+define void @func3(double %f2, double %f3) nounwind {
+entry:
+; CHECK: c.eq.d
+; CHECK: bc1f
+ %cmp = fcmp oeq double %f2, %f3
+ br i1 %cmp, label %if.then, label %if.else
+
+if.then: ; preds = %entry
+ tail call void (...)* @g0() nounwind
+ br label %if.end
+
+if.else: ; preds = %entry
+ tail call void (...)* @g1() nounwind
+ br label %if.end
+
+if.end: ; preds = %if.else, %if.then
+ ret void
+}
+
+define void @func4(double %f2, double %f3) nounwind {
+entry:
+; CHECK: c.olt.d
+; CHECK: bc1f
+ %cmp = fcmp olt double %f2, %f3
+ br i1 %cmp, label %if.then, label %if.else
+
+if.then: ; preds = %entry
+ tail call void (...)* @g0() nounwind
+ br label %if.end
+
+if.else: ; preds = %entry
+ tail call void (...)* @g1() nounwind
+ br label %if.end
+
+if.end: ; preds = %if.else, %if.then
+ ret void
+}
+
+define void @func5(double %f2, double %f3) nounwind {
+entry:
+; CHECK: c.ole.d
+; CHECK: bc1f
+ %cmp = fcmp ugt double %f2, %f3
+ br i1 %cmp, label %if.else, label %if.then
+
+if.then: ; preds = %entry
+ tail call void (...)* @g0() nounwind
+ br label %if.end
+
+if.else: ; preds = %entry
+ tail call void (...)* @g1() nounwind
+ br label %if.end
+
+if.end: ; preds = %if.else, %if.then
+ ret void
+}
diff --git a/test/CodeGen/Mips/fpcmp.ll b/test/CodeGen/Mips/fpcmp.ll
new file mode 100644
index 000000000000..c89ffe67f1b9
--- /dev/null
+++ b/test/CodeGen/Mips/fpcmp.ll
@@ -0,0 +1,23 @@
+; RUN: llc < %s -march=mipsel -mcpu=4ke | FileCheck %s -check-prefix=CHECK-MIPS32R2
+; RUN: llc < %s -march=mipsel | FileCheck %s -check-prefix=CHECK-MIPS1
+
+@g1 = external global i32
+
+define i32 @f(float %f0, float %f1) nounwind {
+entry:
+; CHECK-MIPS32R2: c.olt.s
+; CHECK-MIPS32R2: movt
+; CHECK-MIPS32R2: c.olt.s
+; CHECK-MIPS32R2: movt
+; CHECK-MIPS1: c.olt.s
+; CHECK-MIPS1: bc1t
+; CHECK-MIPS1: c.olt.s
+; CHECK-MIPS1: bc1t
+ %cmp = fcmp olt float %f0, %f1
+ %conv = zext i1 %cmp to i32
+ %tmp2 = load i32* @g1, align 4
+ %add = add nsw i32 %tmp2, %conv
+ store i32 %add, i32* @g1, align 4
+ %cond = select i1 %cmp, i32 10, i32 20
+ ret i32 %cond
+}
diff --git a/test/CodeGen/Mips/internalfunc.ll b/test/CodeGen/Mips/internalfunc.ll
new file mode 100644
index 000000000000..fdfa01a9e0f7
--- /dev/null
+++ b/test/CodeGen/Mips/internalfunc.ll
@@ -0,0 +1,52 @@
+; RUN: llc < %s -march=mips | FileCheck %s
+
+@caller.sf1 = internal unnamed_addr global void (...)* null, align 4
+@gf1 = external global void (...)*
+@.str = private unnamed_addr constant [3 x i8] c"f2\00"
+
+define i32 @main(i32 %argc, i8** nocapture %argv) nounwind {
+entry:
+; CHECK: lw $[[R0:[0-9]+]], %got(f2)($gp)
+; CHECK: addiu $25, $[[R0]], %lo(f2)
+ tail call fastcc void @f2()
+ ret i32 0
+}
+
+define void @caller(i32 %a0, i32 %a1) nounwind {
+entry:
+; CHECK: lw $[[R1:[0-9]+]], %got(caller.sf1)($gp)
+; CHECK: addiu ${{[0-9]+}}, $[[R1]], %lo(caller.sf1)
+ %tobool = icmp eq i32 %a1, 0
+ br i1 %tobool, label %if.end, label %if.then
+
+if.then: ; preds = %entry
+ %tmp1 = load void (...)** @caller.sf1, align 4
+ tail call void (...)* %tmp1() nounwind
+ br label %if.end
+
+if.end: ; preds = %entry, %if.then
+; CHECK: lw $[[R2:[0-9]+]], %got(sf2)($gp)
+; CHECK: lw $[[R3:[0-9]+]], %got(caller.sf1)($gp)
+; CHECK: addiu ${{[0-9]+}}, $[[R2]], %lo(sf2)
+; CHECK: addiu ${{[0-9]+}}, $[[R3]], %lo(caller.sf1)
+ %tobool3 = icmp ne i32 %a0, 0
+ %tmp4 = load void (...)** @gf1, align 4
+ %cond = select i1 %tobool3, void (...)* %tmp4, void (...)* bitcast (void ()* @sf2 to void (...)*)
+ store void (...)* %cond, void (...)** @caller.sf1, align 4
+ ret void
+}
+
+define internal void @sf2() nounwind {
+entry:
+ %call = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([3 x i8]* @.str, i32 0, i32 0)) nounwind
+ ret void
+}
+
+declare i32 @printf(i8* nocapture, ...) nounwind
+
+define internal fastcc void @f2() nounwind noinline {
+entry:
+ %call = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([3 x i8]* @.str, i32 0, i32 0)) nounwind
+ ret void
+}
+
diff --git a/test/CodeGen/Mips/largeimm1.ll b/test/CodeGen/Mips/largeimm1.ll
new file mode 100644
index 000000000000..d65cc025d085
--- /dev/null
+++ b/test/CodeGen/Mips/largeimm1.ll
@@ -0,0 +1,13 @@
+; RUN: llc -march=mipsel < %s | FileCheck %s
+
+; CHECK: lui $at, 49152
+; CHECK: lui $at, 16384
+define void @f() nounwind {
+entry:
+ %a1 = alloca [1073741824 x i8], align 1
+ %arrayidx = getelementptr inbounds [1073741824 x i8]* %a1, i32 0, i32 1048676
+ call void @f2(i8* %arrayidx) nounwind
+ ret void
+}
+
+declare void @f2(i8*)
diff --git a/test/CodeGen/Mips/o32_cc.ll b/test/CodeGen/Mips/o32_cc.ll
index b6df62be6603..3974cd4a6a76 100644
--- a/test/CodeGen/Mips/o32_cc.ll
+++ b/test/CodeGen/Mips/o32_cc.ll
@@ -61,8 +61,8 @@ entry:
declare void @f4(i32, i32, i32, i32)
; $f12, $6, stack
-; CHECK: sw $2, 16($sp)
-; CHECK: sw $zero, 20($sp)
+; CHECK: sw
+; CHECK: sw
; CHECK: ldc1 $f12, %lo
; CHECK: addiu $6, $zero, 23
define void @testlowercall5() nounwind {
@@ -98,8 +98,8 @@ entry:
declare void @f7(float, i32, i32)
; $4, $5, $6, stack
-; CHECK: sw $2, 16($sp)
-; CHECK: sw $zero, 20($sp)
+; CHECK: sw
+; CHECK: sw
; CHECK: addiu $4, $zero, 22
; CHECK: addiu $5, $zero, 53
; CHECK: addiu $6, $zero, 44
@@ -115,7 +115,7 @@ declare void @f8(i32, i32, i32, double)
; CHECK: addiu $4, $zero, 32
; CHECK: addiu $5, $zero, 63
; CHECK: addiu $6, $zero, 54
-; CHECK: ori $7, $2, 0
+; CHECK: ori $7
define void @testlowercall9() nounwind {
entry:
tail call void @f9(i32 32, i32 63, i32 54, float 1.100000e+01) nounwind
@@ -128,7 +128,7 @@ declare void @f9(i32, i32, i32, float)
; CHECK: addiu $4, $zero, 42
; CHECK: addiu $5, $zero, 73
; CHECK: addiu $6, $zero, 0
-; CHECK: ori $7, $2, 0
+; CHECK: ori $7
define void @testlowercall10() nounwind {
entry:
tail call void @f10(i32 42, i32 73, double 2.700000e+01) nounwind
@@ -140,7 +140,7 @@ declare void @f10(i32, i32, double)
; $4, ($6, $7)
; CHECK: addiu $4, $zero, 52
; CHECK: addiu $6, $zero, 0
-; CHECK: ori $7, $2, 0
+; CHECK: ori $7
define void @testlowercall11() nounwind {
entry:
tail call void @f11(i32 52, double 1.600000e+01) nounwind
@@ -152,8 +152,8 @@ declare void @f11(i32, double)
; $f12, $f14, $6, $7
; CHECK: lwc1 $f12, %lo
; CHECK: lwc1 $f14, %lo
-; CHECK: ori $6, $4, 0
-; CHECK: ori $7, $5, 0
+; CHECK: ori $6
+; CHECK: ori $7
define void @testlowercall12() nounwind {
entry:
tail call void @f12(float 2.800000e+01, float 1.900000e+01, float 1.000000e+01, float 2.100000e+01) nounwind
@@ -165,7 +165,7 @@ declare void @f12(float, float, float, float)
; $f12, $5, $6, $7
; CHECK: lwc1 $f12, %lo
; CHECK: addiu $5, $zero, 83
-; CHECK: ori $6, $3, 0
+; CHECK: ori $6
; CHECK: addiu $7, $zero, 25
define void @testlowercall13() nounwind {
entry:
@@ -179,7 +179,7 @@ declare void @f13(float, i32, float, i32)
; $f12, $f14, $7
; CHECK: ldc1 $f12, %lo
; CHECK: lwc1 $f14, %lo
-; CHECK: ori $7, $4, 0
+; CHECK: ori $7
define void @testlowercall14() nounwind {
entry:
tail call void @f14(double 3.500000e+01, float 2.900000e+01, float 3.000000e+01) nounwind
@@ -192,7 +192,7 @@ declare void @f14(double, float, float)
; CHECK: lwc1 $f12, %lo
; CHECK: lwc1 $f14, %lo
; CHECK: addiu $6, $zero, 0
-; CHECK: ori $7, $4, 32768
+; CHECK: ori $7
define void @testlowercall15() nounwind {
entry:
tail call void @f15(float 4.800000e+01, float 3.900000e+01, double 3.700000e+01) nounwind
@@ -203,9 +203,9 @@ declare void @f15(float, float, double)
; $4, $5, $6, $7
; CHECK: addiu $4, $zero, 62
-; CHECK: ori $5, $2, 0
+; CHECK: ori $5
; CHECK: addiu $6, $zero, 64
-; CHECK: ori $7, $3, 0
+; CHECK: ori $7
define void @testlowercall16() nounwind {
entry:
tail call void @f16(i32 62, float 4.900000e+01, i32 64, float 3.100000e+01) nounwind
@@ -216,7 +216,7 @@ declare void @f16(i32, float, i32, float)
; $4, $5, $6, $7
; CHECK: addiu $4, $zero, 72
-; CHECK: ori $5, $2, 0
+; CHECK: ori $5
; CHECK: addiu $6, $zero, 74
; CHECK: addiu $7, $zero, 35
define void @testlowercall17() nounwind {
@@ -230,7 +230,7 @@ declare void @f17(i32, float, i32, i32)
; $4, $5, $6, $7
; CHECK: addiu $4, $zero, 82
; CHECK: addiu $5, $zero, 93
-; CHECK: ori $6, $2, 0
+; CHECK: ori $6
; CHECK: addiu $7, $zero, 45
define void @testlowercall18() nounwind {
entry:
@@ -242,11 +242,11 @@ declare void @f18(i32, i32, float, i32)
; $4, ($6, $7), stack
-; CHECK: sw $2, 16($sp)
-; CHECK: sw $zero, 20($sp)
+; CHECK: sw
+; CHECK: sw
; CHECK: addiu $4, $zero, 92
; CHECK: addiu $6, $zero, 0
-; CHECK: ori $7, $3, 0
+; CHECK: ori $7
define void @testlowercall20() nounwind {
entry:
tail call void @f20(i32 92, double 2.600000e+01, double 4.700000e+01) nounwind
@@ -270,7 +270,7 @@ declare void @f21(float, i32)
; CHECK: lwc1 $f12, %lo
; CHECK: addiu $5, $zero, 113
; CHECK: addiu $6, $zero, 0
-; CHECK: ori $7, $3, 32768
+; CHECK: ori $7
define void @testlowercall22() nounwind {
entry:
tail call void @f22(float 6.800000e+01, i32 113, double 5.700000e+01) nounwind
@@ -291,8 +291,8 @@ entry:
declare void @f23(double, i32)
; $f12,$6, stack
-; CHECK: sw $2, 16($sp)
-; CHECK: sw $zero, 20($sp)
+; CHECK: sw
+; CHECK: sw
; CHECK: ldc1 $f12, %lo
; CHECK: addiu $6, $zero, 133
define void @testlowercall24() nounwind {
@@ -306,15 +306,15 @@ declare void @f24(double, i32, double)
; CHECK: lwc1 $f12, %lo
; lwc1 $f12, %lo
; CHECK: lwc1 $f14, %lo
-; CHECK: ori $6, $4, 0
-; CHECK: ori $7, $5, 0
+; CHECK: ori $6
+; CHECK: ori $7
; CHECK: lwc1 $f12, %lo
; CHECK: addiu $5, $zero, 83
-; CHECK: ori $6, $3, 0
+; CHECK: ori $6
; CHECK: addiu $7, $zero, 25
; CHECK: addiu $4, $zero, 82
; CHECK: addiu $5, $zero, 93
-; CHECK: ori $6, $2, 0
+; CHECK: ori $6
; CHECK: addiu $7, $zero, 45
define void @testlowercall25() nounwind {
entry:
diff --git a/test/CodeGen/Mips/o32_cc_vararg.ll b/test/CodeGen/Mips/o32_cc_vararg.ll
new file mode 100644
index 000000000000..1f71ed2640eb
--- /dev/null
+++ b/test/CodeGen/Mips/o32_cc_vararg.ll
@@ -0,0 +1,278 @@
+; RUN: llc -march=mipsel -mcpu=mips2 -pre-RA-sched=source < %s | FileCheck %s
+; RUN: llc -march=mipsel -mcpu=mips2 -pre-RA-sched=source < %s -regalloc=basic | FileCheck %s
+
+
+; All test functions do the same thing - they return the first variable
+; argument.
+
+; All CHECK's do the same thing - they check whether variable arguments from
+; registers are placed on correct stack locations, and whether the first
+; variable argument is returned from the correct stack location.
+
+
+declare void @llvm.va_start(i8*) nounwind
+declare void @llvm.va_end(i8*) nounwind
+
+; return int
+define i32 @va1(i32 %a, ...) nounwind {
+entry:
+ %a.addr = alloca i32, align 4
+ %ap = alloca i8*, align 4
+ %b = alloca i32, align 4
+ store i32 %a, i32* %a.addr, align 4
+ %ap1 = bitcast i8** %ap to i8*
+ call void @llvm.va_start(i8* %ap1)
+ %0 = va_arg i8** %ap, i32
+ store i32 %0, i32* %b, align 4
+ %ap2 = bitcast i8** %ap to i8*
+ call void @llvm.va_end(i8* %ap2)
+ %tmp = load i32* %b, align 4
+ ret i32 %tmp
+
+; CHECK: va1:
+; CHECK: addiu $sp, $sp, -32
+; CHECK: sw $7, 44($sp)
+; CHECK: sw $6, 40($sp)
+; CHECK: sw $5, 36($sp)
+; CHECK: lw $2, 36($sp)
+}
+
+; check whether the variable double argument will be accessed from the 8-byte
+; aligned location (i.e. whether the address is computed by adding 7 and
+; clearing lower 3 bits)
+define double @va2(i32 %a, ...) nounwind {
+entry:
+ %a.addr = alloca i32, align 4
+ %ap = alloca i8*, align 4
+ %b = alloca double, align 8
+ store i32 %a, i32* %a.addr, align 4
+ %ap1 = bitcast i8** %ap to i8*
+ call void @llvm.va_start(i8* %ap1)
+ %0 = va_arg i8** %ap, double
+ store double %0, double* %b, align 8
+ %ap2 = bitcast i8** %ap to i8*
+ call void @llvm.va_end(i8* %ap2)
+ %tmp = load double* %b, align 8
+ ret double %tmp
+
+; CHECK: va2:
+; CHECK: addiu $sp, $sp, -40
+; CHECK: sw $7, 52($sp)
+; CHECK: sw $6, 48($sp)
+; CHECK: sw $5, 44($sp)
+; CHECK: addiu $[[R0:[0-9]+]], $sp, 44
+; CHECK: addiu $[[R1:[0-9]+]], $[[R0]], 7
+; CHECK: addiu $[[R2:[0-9]+]], $zero, -8
+; CHECK: and $[[R3:[0-9]+]], $[[R1]], $[[R2]]
+; CHECK: ldc1 $f0, 0($[[R3]])
+}
+
+; int
+define i32 @va3(double %a, ...) nounwind {
+entry:
+ %a.addr = alloca double, align 8
+ %ap = alloca i8*, align 4
+ %b = alloca i32, align 4
+ store double %a, double* %a.addr, align 8
+ %ap1 = bitcast i8** %ap to i8*
+ call void @llvm.va_start(i8* %ap1)
+ %0 = va_arg i8** %ap, i32
+ store i32 %0, i32* %b, align 4
+ %ap2 = bitcast i8** %ap to i8*
+ call void @llvm.va_end(i8* %ap2)
+ %tmp = load i32* %b, align 4
+ ret i32 %tmp
+
+; CHECK: va3:
+; CHECK: addiu $sp, $sp, -40
+; CHECK: sw $7, 52($sp)
+; CHECK: sw $6, 48($sp)
+; CHECK: lw $2, 48($sp)
+}
+
+; double
+define double @va4(double %a, ...) nounwind {
+entry:
+ %a.addr = alloca double, align 8
+ %ap = alloca i8*, align 4
+ %b = alloca double, align 8
+ store double %a, double* %a.addr, align 8
+ %ap1 = bitcast i8** %ap to i8*
+ call void @llvm.va_start(i8* %ap1)
+ %0 = va_arg i8** %ap, double
+ store double %0, double* %b, align 8
+ %ap2 = bitcast i8** %ap to i8*
+ call void @llvm.va_end(i8* %ap2)
+ %tmp = load double* %b, align 8
+ ret double %tmp
+
+; CHECK: va4:
+; CHECK: addiu $sp, $sp, -48
+; CHECK: sw $7, 60($sp)
+; CHECK: sw $6, 56($sp)
+; CHECK: addiu $[[R0:[0-9]+]], $sp, 56
+; CHECK: addiu $[[R1:[0-9]+]], $[[R0]], 7
+; CHECK: addiu $[[R2:[0-9]+]], $zero, -8
+; CHECK: and $[[R3:[0-9]+]], $[[R1]], $[[R2]]
+; CHECK: ldc1 $f0, 0($[[R3]])
+}
+
+; int
+define i32 @va5(i32 %a, i32 %b, i32 %c, ...) nounwind {
+entry:
+ %a.addr = alloca i32, align 4
+ %b.addr = alloca i32, align 4
+ %c.addr = alloca i32, align 4
+ %ap = alloca i8*, align 4
+ %d = alloca i32, align 4
+ store i32 %a, i32* %a.addr, align 4
+ store i32 %b, i32* %b.addr, align 4
+ store i32 %c, i32* %c.addr, align 4
+ %ap1 = bitcast i8** %ap to i8*
+ call void @llvm.va_start(i8* %ap1)
+ %0 = va_arg i8** %ap, i32
+ store i32 %0, i32* %d, align 4
+ %ap2 = bitcast i8** %ap to i8*
+ call void @llvm.va_end(i8* %ap2)
+ %tmp = load i32* %d, align 4
+ ret i32 %tmp
+
+; CHECK: va5:
+; CHECK: addiu $sp, $sp, -40
+; CHECK: sw $7, 52($sp)
+; CHECK: lw $2, 52($sp)
+}
+
+; double
+define double @va6(i32 %a, i32 %b, i32 %c, ...) nounwind {
+entry:
+ %a.addr = alloca i32, align 4
+ %b.addr = alloca i32, align 4
+ %c.addr = alloca i32, align 4
+ %ap = alloca i8*, align 4
+ %d = alloca double, align 8
+ store i32 %a, i32* %a.addr, align 4
+ store i32 %b, i32* %b.addr, align 4
+ store i32 %c, i32* %c.addr, align 4
+ %ap1 = bitcast i8** %ap to i8*
+ call void @llvm.va_start(i8* %ap1)
+ %0 = va_arg i8** %ap, double
+ store double %0, double* %d, align 8
+ %ap2 = bitcast i8** %ap to i8*
+ call void @llvm.va_end(i8* %ap2)
+ %tmp = load double* %d, align 8
+ ret double %tmp
+
+; CHECK: va6:
+; CHECK: addiu $sp, $sp, -48
+; CHECK: sw $7, 60($sp)
+; CHECK: addiu $[[R0:[0-9]+]], $sp, 60
+; CHECK: addiu $[[R1:[0-9]+]], $[[R0]], 7
+; CHECK: addiu $[[R2:[0-9]+]], $zero, -8
+; CHECK: and $[[R3:[0-9]+]], $[[R1]], $[[R2]]
+; CHECK: ldc1 $f0, 0($[[R3]])
+}
+
+; int
+define i32 @va7(i32 %a, double %b, ...) nounwind {
+entry:
+ %a.addr = alloca i32, align 4
+ %b.addr = alloca double, align 8
+ %ap = alloca i8*, align 4
+ %c = alloca i32, align 4
+ store i32 %a, i32* %a.addr, align 4
+ store double %b, double* %b.addr, align 8
+ %ap1 = bitcast i8** %ap to i8*
+ call void @llvm.va_start(i8* %ap1)
+ %0 = va_arg i8** %ap, i32
+ store i32 %0, i32* %c, align 4
+ %ap2 = bitcast i8** %ap to i8*
+ call void @llvm.va_end(i8* %ap2)
+ %tmp = load i32* %c, align 4
+ ret i32 %tmp
+
+; CHECK: va7:
+; CHECK: addiu $sp, $sp, -40
+; CHECK: lw $2, 56($sp)
+}
+
+; double
+define double @va8(i32 %a, double %b, ...) nounwind {
+entry:
+ %a.addr = alloca i32, align 4
+ %b.addr = alloca double, align 8
+ %ap = alloca i8*, align 4
+ %c = alloca double, align 8
+ store i32 %a, i32* %a.addr, align 4
+ store double %b, double* %b.addr, align 8
+ %ap1 = bitcast i8** %ap to i8*
+ call void @llvm.va_start(i8* %ap1)
+ %0 = va_arg i8** %ap, double
+ store double %0, double* %c, align 8
+ %ap2 = bitcast i8** %ap to i8*
+ call void @llvm.va_end(i8* %ap2)
+ %tmp = load double* %c, align 8
+ ret double %tmp
+
+; CHECK: va8:
+; CHECK: addiu $sp, $sp, -48
+; CHECK: addiu $[[R0:[0-9]+]], $sp, 64
+; CHECK: addiu $[[R1:[0-9]+]], $[[R0]], 7
+; CHECK: addiu $[[R2:[0-9]+]], $zero, -8
+; CHECK: and $[[R3:[0-9]+]], $[[R1]], $[[R2]]
+; CHECK: ldc1 $f0, 0($[[R3]])
+}
+
+; int
+define i32 @va9(double %a, double %b, i32 %c, ...) nounwind {
+entry:
+ %a.addr = alloca double, align 8
+ %b.addr = alloca double, align 8
+ %c.addr = alloca i32, align 4
+ %ap = alloca i8*, align 4
+ %d = alloca i32, align 4
+ store double %a, double* %a.addr, align 8
+ store double %b, double* %b.addr, align 8
+ store i32 %c, i32* %c.addr, align 4
+ %ap1 = bitcast i8** %ap to i8*
+ call void @llvm.va_start(i8* %ap1)
+ %0 = va_arg i8** %ap, i32
+ store i32 %0, i32* %d, align 4
+ %ap2 = bitcast i8** %ap to i8*
+ call void @llvm.va_end(i8* %ap2)
+ %tmp = load i32* %d, align 4
+ ret i32 %tmp
+
+; CHECK: va9:
+; CHECK: addiu $sp, $sp, -56
+; CHECK: lw $2, 76($sp)
+}
+
+; double
+define double @va10(double %a, double %b, i32 %c, ...) nounwind {
+entry:
+ %a.addr = alloca double, align 8
+ %b.addr = alloca double, align 8
+ %c.addr = alloca i32, align 4
+ %ap = alloca i8*, align 4
+ %d = alloca double, align 8
+ store double %a, double* %a.addr, align 8
+ store double %b, double* %b.addr, align 8
+ store i32 %c, i32* %c.addr, align 4
+ %ap1 = bitcast i8** %ap to i8*
+ call void @llvm.va_start(i8* %ap1)
+ %0 = va_arg i8** %ap, double
+ store double %0, double* %d, align 8
+ %ap2 = bitcast i8** %ap to i8*
+ call void @llvm.va_end(i8* %ap2)
+ %tmp = load double* %d, align 8
+ ret double %tmp
+
+; CHECK: va10:
+; CHECK: addiu $sp, $sp, -56
+; CHECK: addiu $[[R0:[0-9]+]], $sp, 76
+; CHECK: addiu $[[R1:[0-9]+]], $[[R0]], 7
+; CHECK: addiu $[[R2:[0-9]+]], $zero, -8
+; CHECK: and $[[R3:[0-9]+]], $[[R1]], $[[R2]]
+; CHECK: ldc1 $f0, 0($[[R3]])
+}
diff --git a/test/CodeGen/Mips/select.ll b/test/CodeGen/Mips/select.ll
new file mode 100644
index 000000000000..c83fa3ece026
--- /dev/null
+++ b/test/CodeGen/Mips/select.ll
@@ -0,0 +1,196 @@
+; RUN: llc < %s -march=mipsel -mcpu=4ke | FileCheck %s -check-prefix=CHECK-MIPS32R2
+; RUN: llc < %s -march=mipsel | FileCheck %s -check-prefix=CHECK-MIPS1
+
+@d2 = external global double
+@d3 = external global double
+
+define i32 @sel1(i32 %s, i32 %f0, i32 %f1) nounwind readnone {
+entry:
+; CHECK-MIPS32R2: movn
+; CHECK-MIPS1: beq
+ %tobool = icmp ne i32 %s, 0
+ %cond = select i1 %tobool, i32 %f1, i32 %f0
+ ret i32 %cond
+}
+
+define float @sel2(i32 %s, float %f0, float %f1) nounwind readnone {
+entry:
+; CHECK-MIPS32R2: movn.s
+; CHECK-MIPS1: beq
+ %tobool = icmp ne i32 %s, 0
+ %cond = select i1 %tobool, float %f0, float %f1
+ ret float %cond
+}
+
+define double @sel2_1(i32 %s, double %f0, double %f1) nounwind readnone {
+entry:
+; CHECK-MIPS32R2: movn.d
+; CHECK-MIPS1: beq
+ %tobool = icmp ne i32 %s, 0
+ %cond = select i1 %tobool, double %f0, double %f1
+ ret double %cond
+}
+
+define float @sel3(float %f0, float %f1, float %f2, float %f3) nounwind readnone {
+entry:
+; CHECK-MIPS32R2: c.eq.s
+; CHECK-MIPS32R2: movt.s
+; CHECK-MIPS1: c.eq.s
+; CHECK-MIPS1: bc1f
+ %cmp = fcmp oeq float %f2, %f3
+ %cond = select i1 %cmp, float %f0, float %f1
+ ret float %cond
+}
+
+define float @sel4(float %f0, float %f1, float %f2, float %f3) nounwind readnone {
+entry:
+; CHECK-MIPS32R2: c.olt.s
+; CHECK-MIPS32R2: movt.s
+; CHECK-MIPS1: c.olt.s
+; CHECK-MIPS1: bc1f
+ %cmp = fcmp olt float %f2, %f3
+ %cond = select i1 %cmp, float %f0, float %f1
+ ret float %cond
+}
+
+define float @sel5(float %f0, float %f1, float %f2, float %f3) nounwind readnone {
+entry:
+; CHECK-MIPS32R2: c.ule.s
+; CHECK-MIPS32R2: movf.s
+; CHECK-MIPS1: c.ule.s
+; CHECK-MIPS1: bc1t
+ %cmp = fcmp ogt float %f2, %f3
+ %cond = select i1 %cmp, float %f0, float %f1
+ ret float %cond
+}
+
+define double @sel5_1(double %f0, double %f1, float %f2, float %f3) nounwind readnone {
+entry:
+; CHECK-MIPS32R2: c.ule.s
+; CHECK-MIPS32R2: movf.d
+; CHECK-MIPS1: c.ule.s
+; CHECK-MIPS1: bc1t
+ %cmp = fcmp ogt float %f2, %f3
+ %cond = select i1 %cmp, double %f0, double %f1
+ ret double %cond
+}
+
+define double @sel6(double %f0, double %f1, double %f2, double %f3) nounwind readnone {
+entry:
+; CHECK-MIPS32R2: c.eq.d
+; CHECK-MIPS32R2: movt.d
+; CHECK-MIPS1: c.eq.d
+; CHECK-MIPS1: bc1f
+ %cmp = fcmp oeq double %f2, %f3
+ %cond = select i1 %cmp, double %f0, double %f1
+ ret double %cond
+}
+
+define double @sel7(double %f0, double %f1, double %f2, double %f3) nounwind readnone {
+entry:
+; CHECK-MIPS32R2: c.olt.d
+; CHECK-MIPS32R2: movt.d
+; CHECK-MIPS1: c.olt.d
+; CHECK-MIPS1: bc1f
+ %cmp = fcmp olt double %f2, %f3
+ %cond = select i1 %cmp, double %f0, double %f1
+ ret double %cond
+}
+
+define double @sel8(double %f0, double %f1, double %f2, double %f3) nounwind readnone {
+entry:
+; CHECK-MIPS32R2: c.ule.d
+; CHECK-MIPS32R2: movf.d
+; CHECK-MIPS1: c.ule.d
+; CHECK-MIPS1: bc1t
+ %cmp = fcmp ogt double %f2, %f3
+ %cond = select i1 %cmp, double %f0, double %f1
+ ret double %cond
+}
+
+define float @sel8_1(float %f0, float %f1, double %f2, double %f3) nounwind readnone {
+entry:
+; CHECK-MIPS32R2: c.ule.d
+; CHECK-MIPS32R2: movf.s
+; CHECK-MIPS1: c.ule.d
+; CHECK-MIPS1: bc1t
+ %cmp = fcmp ogt double %f2, %f3
+ %cond = select i1 %cmp, float %f0, float %f1
+ ret float %cond
+}
+
+define i32 @sel9(i32 %f0, i32 %f1, float %f2, float %f3) nounwind readnone {
+entry:
+; CHECK-MIPS32R2: c.eq.s
+; CHECK-MIPS32R2: movt
+; CHECK-MIPS1: c.eq.s
+; CHECK-MIPS1: bc1f
+ %cmp = fcmp oeq float %f2, %f3
+ %cond = select i1 %cmp, i32 %f0, i32 %f1
+ ret i32 %cond
+}
+
+define i32 @sel10(i32 %f0, i32 %f1, float %f2, float %f3) nounwind readnone {
+entry:
+; CHECK-MIPS32R2: c.olt.s
+; CHECK-MIPS32R2: movt
+; CHECK-MIPS1: c.olt.s
+; CHECK-MIPS1: bc1f
+ %cmp = fcmp olt float %f2, %f3
+ %cond = select i1 %cmp, i32 %f0, i32 %f1
+ ret i32 %cond
+}
+
+define i32 @sel11(i32 %f0, i32 %f1, float %f2, float %f3) nounwind readnone {
+entry:
+; CHECK-MIPS32R2: c.ule.s
+; CHECK-MIPS32R2: movf
+; CHECK-MIPS1: c.ule.s
+; CHECK-MIPS1: bc1t
+ %cmp = fcmp ogt float %f2, %f3
+ %cond = select i1 %cmp, i32 %f0, i32 %f1
+ ret i32 %cond
+}
+
+define i32 @sel12(i32 %f0, i32 %f1) nounwind readonly {
+entry:
+; CHECK-MIPS32R2: c.eq.d
+; CHECK-MIPS32R2: movt
+; CHECK-MIPS1: c.eq.d
+; CHECK-MIPS1: bc1f
+ %tmp = load double* @d2, align 8, !tbaa !0
+ %tmp1 = load double* @d3, align 8, !tbaa !0
+ %cmp = fcmp oeq double %tmp, %tmp1
+ %cond = select i1 %cmp, i32 %f0, i32 %f1
+ ret i32 %cond
+}
+
+define i32 @sel13(i32 %f0, i32 %f1) nounwind readonly {
+entry:
+; CHECK-MIPS32R2: c.olt.d
+; CHECK-MIPS32R2: movt
+; CHECK-MIPS1: c.olt.d
+; CHECK-MIPS1: bc1f
+ %tmp = load double* @d2, align 8, !tbaa !0
+ %tmp1 = load double* @d3, align 8, !tbaa !0
+ %cmp = fcmp olt double %tmp, %tmp1
+ %cond = select i1 %cmp, i32 %f0, i32 %f1
+ ret i32 %cond
+}
+
+define i32 @sel14(i32 %f0, i32 %f1) nounwind readonly {
+entry:
+; CHECK-MIPS32R2: c.ule.d
+; CHECK-MIPS32R2: movf
+; CHECK-MIPS1: c.ule.d
+; CHECK-MIPS1: bc1t
+ %tmp = load double* @d2, align 8, !tbaa !0
+ %tmp1 = load double* @d3, align 8, !tbaa !0
+ %cmp = fcmp ogt double %tmp, %tmp1
+ %cond = select i1 %cmp, i32 %f0, i32 %f1
+ ret i32 %cond
+}
+
+!0 = metadata !{metadata !"double", metadata !1}
+!1 = metadata !{metadata !"omnipotent char", metadata !2}
+!2 = metadata !{metadata !"Simple C/C++ TBAA", null}
diff --git a/test/CodeGen/PTX/add.ll b/test/CodeGen/PTX/add.ll
index 1259d03e96c9..235b00e8782f 100644
--- a/test/CodeGen/PTX/add.ll
+++ b/test/CodeGen/PTX/add.ll
@@ -1,15 +1,71 @@
-; RUN: llc < %s -march=ptx | FileCheck %s
+; RUN: llc < %s -march=ptx32 | FileCheck %s
-define ptx_device i32 @t1(i32 %x, i32 %y) {
-; CHECK: add.s32 r0, r1, r2;
+define ptx_device i16 @t1_u16(i16 %x, i16 %y) {
+; CHECK: add.u16 rh0, rh1, rh2;
+; CHECK-NEXT: ret;
+ %z = add i16 %x, %y
+ ret i16 %z
+}
+
+define ptx_device i32 @t1_u32(i32 %x, i32 %y) {
+; CHECK: add.u32 r0, r1, r2;
+; CHECK-NEXT: ret;
%z = add i32 %x, %y
-; CHECK: ret;
ret i32 %z
}
-define ptx_device i32 @t2(i32 %x) {
-; CHECK: add.s32 r0, r1, 1;
+define ptx_device i64 @t1_u64(i64 %x, i64 %y) {
+; CHECK: add.u64 rd0, rd1, rd2;
+; CHECK-NEXT: ret;
+ %z = add i64 %x, %y
+ ret i64 %z
+}
+
+define ptx_device float @t1_f32(float %x, float %y) {
+; CHECK: add.f32 f0, f1, f2
+; CHECK-NEXT: ret;
+ %z = fadd float %x, %y
+ ret float %z
+}
+
+define ptx_device double @t1_f64(double %x, double %y) {
+; CHECK: add.f64 fd0, fd1, fd2
+; CHECK-NEXT: ret;
+ %z = fadd double %x, %y
+ ret double %z
+}
+
+define ptx_device i16 @t2_u16(i16 %x) {
+; CHECK: add.u16 rh0, rh1, 1;
+; CHECK-NEXT: ret;
+ %z = add i16 %x, 1
+ ret i16 %z
+}
+
+define ptx_device i32 @t2_u32(i32 %x) {
+; CHECK: add.u32 r0, r1, 1;
+; CHECK-NEXT: ret;
%z = add i32 %x, 1
-; CHECK: ret;
ret i32 %z
}
+
+define ptx_device i64 @t2_u64(i64 %x) {
+; CHECK: add.u64 rd0, rd1, 1;
+; CHECK-NEXT: ret;
+ %z = add i64 %x, 1
+ ret i64 %z
+}
+
+define ptx_device float @t2_f32(float %x) {
+; CHECK: add.f32 f0, f1, 0F3F800000;
+; CHECK-NEXT: ret;
+ %z = fadd float %x, 1.0
+ ret float %z
+}
+
+define ptx_device double @t2_f64(double %x) {
+; CHECK: add.f64 fd0, fd1, 0D3FF0000000000000;
+; CHECK-NEXT: ret;
+ %z = fadd double %x, 1.0
+ ret double %z
+}
diff --git a/test/CodeGen/PTX/bitwise.ll b/test/CodeGen/PTX/bitwise.ll
new file mode 100644
index 000000000000..dbc77e53330b
--- /dev/null
+++ b/test/CodeGen/PTX/bitwise.ll
@@ -0,0 +1,24 @@
+; RUN: llc < %s -march=ptx32 | FileCheck %s
+
+; preds
+
+define ptx_device i32 @t1_and_preds(i1 %x, i1 %y) {
+; CHECK: and.pred p0, p1, p2
+ %c = and i1 %x, %y
+ %d = zext i1 %c to i32
+ ret i32 %d
+}
+
+define ptx_device i32 @t1_or_preds(i1 %x, i1 %y) {
+; CHECK: or.pred p0, p1, p2
+ %a = or i1 %x, %y
+ %b = zext i1 %a to i32
+ ret i32 %b
+}
+
+define ptx_device i32 @t1_xor_preds(i1 %x, i1 %y) {
+; CHECK: xor.pred p0, p1, p2
+ %a = xor i1 %x, %y
+ %b = zext i1 %a to i32
+ ret i32 %b
+}
diff --git a/test/CodeGen/PTX/bra.ll b/test/CodeGen/PTX/bra.ll
new file mode 100644
index 000000000000..49383eb3cf96
--- /dev/null
+++ b/test/CodeGen/PTX/bra.ll
@@ -0,0 +1,24 @@
+; RUN: llc < %s -march=ptx32 | FileCheck %s
+
+define ptx_device void @test_bra_direct() {
+; CHECK: bra $L__BB0_1;
+entry:
+ br label %loop
+loop:
+ br label %loop
+}
+
+define ptx_device i32 @test_bra_cond_direct(i32 %x, i32 %y) {
+entry:
+; CHECK: setp.le.u32 p0, r1, r2
+ %p = icmp ugt i32 %x, %y
+; CHECK-NEXT: @p0 bra
+; CHECK-NOT: bra
+ br i1 %p, label %clause.if, label %clause.else
+clause.if:
+; CHECK: mov.u32 r0, r1
+ ret i32 %x
+clause.else:
+; CHECK: mov.u32 r0, r2
+ ret i32 %y
+}
diff --git a/test/CodeGen/PTX/exit.ll b/test/CodeGen/PTX/exit.ll
index 4071babb80ce..7816c801728f 100644
--- a/test/CodeGen/PTX/exit.ll
+++ b/test/CodeGen/PTX/exit.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -march=ptx | FileCheck %s
+; RUN: llc < %s -march=ptx32 | FileCheck %s
define ptx_kernel void @t1() {
; CHECK: exit;
diff --git a/test/CodeGen/PTX/fdiv-sm10.ll b/test/CodeGen/PTX/fdiv-sm10.ll
new file mode 100644
index 000000000000..121360ce9be3
--- /dev/null
+++ b/test/CodeGen/PTX/fdiv-sm10.ll
@@ -0,0 +1,15 @@
+; RUN: llc < %s -march=ptx32 -mattr=+sm10 | FileCheck %s
+
+define ptx_device float @t1_f32(float %x, float %y) {
+; CHECK: div.approx.f32 f0, f1, f2;
+; CHECK-NEXT: ret;
+ %a = fdiv float %x, %y
+ ret float %a
+}
+
+define ptx_device double @t1_f64(double %x, double %y) {
+; CHECK: div.f64 fd0, fd1, fd2;
+; CHECK-NEXT: ret;
+ %a = fdiv double %x, %y
+ ret double %a
+}
diff --git a/test/CodeGen/PTX/fdiv-sm13.ll b/test/CodeGen/PTX/fdiv-sm13.ll
new file mode 100644
index 000000000000..0ec7bae8030e
--- /dev/null
+++ b/test/CodeGen/PTX/fdiv-sm13.ll
@@ -0,0 +1,15 @@
+; RUN: llc < %s -march=ptx32 -mattr=+sm13 | FileCheck %s
+
+define ptx_device float @t1_f32(float %x, float %y) {
+; CHECK: div.approx.f32 f0, f1, f2;
+; CHECK-NEXT: ret;
+ %a = fdiv float %x, %y
+ ret float %a
+}
+
+define ptx_device double @t1_f64(double %x, double %y) {
+; CHECK: div.rn.f64 fd0, fd1, fd2;
+; CHECK-NEXT: ret;
+ %a = fdiv double %x, %y
+ ret double %a
+}
diff --git a/test/CodeGen/PTX/intrinsic.ll b/test/CodeGen/PTX/intrinsic.ll
new file mode 100644
index 000000000000..cea41827ca47
--- /dev/null
+++ b/test/CodeGen/PTX/intrinsic.ll
@@ -0,0 +1,281 @@
+; RUN: llc < %s -march=ptx32 -mattr=+ptx20,+sm20 | FileCheck %s
+
+define ptx_device i32 @test_tid_x() {
+; CHECK: mov.u32 r0, %tid.x;
+; CHECK-NEXT: ret;
+ %x = call i32 @llvm.ptx.read.tid.x()
+ ret i32 %x
+}
+
+define ptx_device i32 @test_tid_y() {
+; CHECK: mov.u32 r0, %tid.y;
+; CHECK-NEXT: ret;
+ %x = call i32 @llvm.ptx.read.tid.y()
+ ret i32 %x
+}
+
+define ptx_device i32 @test_tid_z() {
+; CHECK: mov.u32 r0, %tid.z;
+; CHECK-NEXT: ret;
+ %x = call i32 @llvm.ptx.read.tid.z()
+ ret i32 %x
+}
+
+define ptx_device i32 @test_tid_w() {
+; CHECK: mov.u32 r0, %tid.w;
+; CHECK-NEXT: ret;
+ %x = call i32 @llvm.ptx.read.tid.w()
+ ret i32 %x
+}
+
+define ptx_device i32 @test_ntid_x() {
+; CHECK: mov.u32 r0, %ntid.x;
+; CHECK-NEXT: ret;
+ %x = call i32 @llvm.ptx.read.ntid.x()
+ ret i32 %x
+}
+
+define ptx_device i32 @test_ntid_y() {
+; CHECK: mov.u32 r0, %ntid.y;
+; CHECK-NEXT: ret;
+ %x = call i32 @llvm.ptx.read.ntid.y()
+ ret i32 %x
+}
+
+define ptx_device i32 @test_ntid_z() {
+; CHECK: mov.u32 r0, %ntid.z;
+; CHECK-NEXT: ret;
+ %x = call i32 @llvm.ptx.read.ntid.z()
+ ret i32 %x
+}
+
+define ptx_device i32 @test_ntid_w() {
+; CHECK: mov.u32 r0, %ntid.w;
+; CHECK-NEXT: ret;
+ %x = call i32 @llvm.ptx.read.ntid.w()
+ ret i32 %x
+}
+
+define ptx_device i32 @test_laneid() {
+; CHECK: mov.u32 r0, %laneid;
+; CHECK-NEXT: ret;
+ %x = call i32 @llvm.ptx.read.laneid()
+ ret i32 %x
+}
+
+define ptx_device i32 @test_warpid() {
+; CHECK: mov.u32 r0, %warpid;
+; CHECK-NEXT: ret;
+ %x = call i32 @llvm.ptx.read.warpid()
+ ret i32 %x
+}
+
+define ptx_device i32 @test_nwarpid() {
+; CHECK: mov.u32 r0, %nwarpid;
+; CHECK-NEXT: ret;
+ %x = call i32 @llvm.ptx.read.nwarpid()
+ ret i32 %x
+}
+
+define ptx_device i32 @test_ctaid_x() {
+; CHECK: mov.u32 r0, %ctaid.x;
+; CHECK-NEXT: ret;
+ %x = call i32 @llvm.ptx.read.ctaid.x()
+ ret i32 %x
+}
+
+define ptx_device i32 @test_ctaid_y() {
+; CHECK: mov.u32 r0, %ctaid.y;
+; CHECK-NEXT: ret;
+ %x = call i32 @llvm.ptx.read.ctaid.y()
+ ret i32 %x
+}
+
+define ptx_device i32 @test_ctaid_z() {
+; CHECK: mov.u32 r0, %ctaid.z;
+; CHECK-NEXT: ret;
+ %x = call i32 @llvm.ptx.read.ctaid.z()
+ ret i32 %x
+}
+
+define ptx_device i32 @test_ctaid_w() {
+; CHECK: mov.u32 r0, %ctaid.w;
+; CHECK-NEXT: ret;
+ %x = call i32 @llvm.ptx.read.ctaid.w()
+ ret i32 %x
+}
+
+define ptx_device i32 @test_nctaid_x() {
+; CHECK: mov.u32 r0, %nctaid.x;
+; CHECK-NEXT: ret;
+ %x = call i32 @llvm.ptx.read.nctaid.x()
+ ret i32 %x
+}
+
+define ptx_device i32 @test_nctaid_y() {
+; CHECK: mov.u32 r0, %nctaid.y;
+; CHECK-NEXT: ret;
+ %x = call i32 @llvm.ptx.read.nctaid.y()
+ ret i32 %x
+}
+
+define ptx_device i32 @test_nctaid_z() {
+; CHECK: mov.u32 r0, %nctaid.z;
+; CHECK-NEXT: ret;
+ %x = call i32 @llvm.ptx.read.nctaid.z()
+ ret i32 %x
+}
+
+define ptx_device i32 @test_nctaid_w() {
+; CHECK: mov.u32 r0, %nctaid.w;
+; CHECK-NEXT: ret;
+ %x = call i32 @llvm.ptx.read.nctaid.w()
+ ret i32 %x
+}
+
+define ptx_device i32 @test_smid() {
+; CHECK: mov.u32 r0, %smid;
+; CHECK-NEXT: ret;
+ %x = call i32 @llvm.ptx.read.smid()
+ ret i32 %x
+}
+
+define ptx_device i32 @test_nsmid() {
+; CHECK: mov.u32 r0, %nsmid;
+; CHECK-NEXT: ret;
+ %x = call i32 @llvm.ptx.read.nsmid()
+ ret i32 %x
+}
+
+define ptx_device i32 @test_gridid() {
+; CHECK: mov.u32 r0, %gridid;
+; CHECK-NEXT: ret;
+ %x = call i32 @llvm.ptx.read.gridid()
+ ret i32 %x
+}
+
+define ptx_device i32 @test_lanemask_eq() {
+; CHECK: mov.u32 r0, %lanemask_eq;
+; CHECK-NEXT: ret;
+ %x = call i32 @llvm.ptx.read.lanemask.eq()
+ ret i32 %x
+}
+
+define ptx_device i32 @test_lanemask_le() {
+; CHECK: mov.u32 r0, %lanemask_le;
+; CHECK-NEXT: ret;
+ %x = call i32 @llvm.ptx.read.lanemask.le()
+ ret i32 %x
+}
+
+define ptx_device i32 @test_lanemask_lt() {
+; CHECK: mov.u32 r0, %lanemask_lt;
+; CHECK-NEXT: ret;
+ %x = call i32 @llvm.ptx.read.lanemask.lt()
+ ret i32 %x
+}
+
+define ptx_device i32 @test_lanemask_ge() {
+; CHECK: mov.u32 r0, %lanemask_ge;
+; CHECK-NEXT: ret;
+ %x = call i32 @llvm.ptx.read.lanemask.ge()
+ ret i32 %x
+}
+
+define ptx_device i32 @test_lanemask_gt() {
+; CHECK: mov.u32 r0, %lanemask_gt;
+; CHECK-NEXT: ret;
+ %x = call i32 @llvm.ptx.read.lanemask.gt()
+ ret i32 %x
+}
+
+define ptx_device i32 @test_clock() {
+; CHECK: mov.u32 r0, %clock;
+; CHECK-NEXT: ret;
+ %x = call i32 @llvm.ptx.read.clock()
+ ret i32 %x
+}
+
+define ptx_device i64 @test_clock64() {
+; CHECK: mov.u64 rd0, %clock64;
+; CHECK-NEXT: ret;
+ %x = call i64 @llvm.ptx.read.clock64()
+ ret i64 %x
+}
+
+define ptx_device i32 @test_pm0() {
+; CHECK: mov.u32 r0, %pm0;
+; CHECK-NEXT: ret;
+ %x = call i32 @llvm.ptx.read.pm0()
+ ret i32 %x
+}
+
+define ptx_device i32 @test_pm1() {
+; CHECK: mov.u32 r0, %pm1;
+; CHECK-NEXT: ret;
+ %x = call i32 @llvm.ptx.read.pm1()
+ ret i32 %x
+}
+
+define ptx_device i32 @test_pm2() {
+; CHECK: mov.u32 r0, %pm2;
+; CHECK-NEXT: ret;
+ %x = call i32 @llvm.ptx.read.pm2()
+ ret i32 %x
+}
+
+define ptx_device i32 @test_pm3() {
+; CHECK: mov.u32 r0, %pm3;
+; CHECK-NEXT: ret;
+ %x = call i32 @llvm.ptx.read.pm3()
+ ret i32 %x
+}
+
+define ptx_device void @test_bar_sync() {
+; CHECK: bar.sync 0
+; CHECK-NEXT: ret;
+ call void @llvm.ptx.bar.sync(i32 0)
+ ret void
+}
+
+declare i32 @llvm.ptx.read.tid.x()
+declare i32 @llvm.ptx.read.tid.y()
+declare i32 @llvm.ptx.read.tid.z()
+declare i32 @llvm.ptx.read.tid.w()
+declare i32 @llvm.ptx.read.ntid.x()
+declare i32 @llvm.ptx.read.ntid.y()
+declare i32 @llvm.ptx.read.ntid.z()
+declare i32 @llvm.ptx.read.ntid.w()
+
+declare i32 @llvm.ptx.read.laneid()
+declare i32 @llvm.ptx.read.warpid()
+declare i32 @llvm.ptx.read.nwarpid()
+
+declare i32 @llvm.ptx.read.ctaid.x()
+declare i32 @llvm.ptx.read.ctaid.y()
+declare i32 @llvm.ptx.read.ctaid.z()
+declare i32 @llvm.ptx.read.ctaid.w()
+declare i32 @llvm.ptx.read.nctaid.x()
+declare i32 @llvm.ptx.read.nctaid.y()
+declare i32 @llvm.ptx.read.nctaid.z()
+declare i32 @llvm.ptx.read.nctaid.w()
+
+declare i32 @llvm.ptx.read.smid()
+declare i32 @llvm.ptx.read.nsmid()
+declare i32 @llvm.ptx.read.gridid()
+
+declare i32 @llvm.ptx.read.lanemask.eq()
+declare i32 @llvm.ptx.read.lanemask.le()
+declare i32 @llvm.ptx.read.lanemask.lt()
+declare i32 @llvm.ptx.read.lanemask.ge()
+declare i32 @llvm.ptx.read.lanemask.gt()
+
+declare i32 @llvm.ptx.read.clock()
+declare i64 @llvm.ptx.read.clock64()
+
+declare i32 @llvm.ptx.read.pm0()
+declare i32 @llvm.ptx.read.pm1()
+declare i32 @llvm.ptx.read.pm2()
+declare i32 @llvm.ptx.read.pm3()
+
+declare void @llvm.ptx.bar.sync(i32 %i)
diff --git a/test/CodeGen/PTX/ld.ll b/test/CodeGen/PTX/ld.ll
index 836c4d41045a..377a95abe3db 100644
--- a/test/CodeGen/PTX/ld.ll
+++ b/test/CodeGen/PTX/ld.ll
@@ -1,78 +1,447 @@
-; RUN: llc < %s -march=ptx | FileCheck %s
+; RUN: llc < %s -march=ptx32 | FileCheck %s
-;CHECK: .extern .global .s32 array[];
-@array = external global [10 x i32]
+;CHECK: .extern .global .b8 array_i16[20];
+@array_i16 = external global [10 x i16]
-;CHECK: .extern .const .s32 array_constant[];
-@array_constant = external addrspace(1) constant [10 x i32]
+;CHECK: .extern .const .b8 array_constant_i16[20];
+@array_constant_i16 = external addrspace(1) constant [10 x i16]
-;CHECK: .extern .local .s32 array_local[];
-@array_local = external addrspace(2) global [10 x i32]
+;CHECK: .extern .local .b8 array_local_i16[20];
+@array_local_i16 = external addrspace(2) global [10 x i16]
-;CHECK: .extern .shared .s32 array_shared[];
-@array_shared = external addrspace(4) global [10 x i32]
+;CHECK: .extern .shared .b8 array_shared_i16[20];
+@array_shared_i16 = external addrspace(4) global [10 x i16]
-define ptx_device i32 @t1(i32* %p) {
+;CHECK: .extern .global .b8 array_i32[40];
+@array_i32 = external global [10 x i32]
+
+;CHECK: .extern .const .b8 array_constant_i32[40];
+@array_constant_i32 = external addrspace(1) constant [10 x i32]
+
+;CHECK: .extern .local .b8 array_local_i32[40];
+@array_local_i32 = external addrspace(2) global [10 x i32]
+
+;CHECK: .extern .shared .b8 array_shared_i32[40];
+@array_shared_i32 = external addrspace(4) global [10 x i32]
+
+;CHECK: .extern .global .b8 array_i64[80];
+@array_i64 = external global [10 x i64]
+
+;CHECK: .extern .const .b8 array_constant_i64[80];
+@array_constant_i64 = external addrspace(1) constant [10 x i64]
+
+;CHECK: .extern .local .b8 array_local_i64[80];
+@array_local_i64 = external addrspace(2) global [10 x i64]
+
+;CHECK: .extern .shared .b8 array_shared_i64[80];
+@array_shared_i64 = external addrspace(4) global [10 x i64]
+
+;CHECK: .extern .global .b8 array_float[40];
+@array_float = external global [10 x float]
+
+;CHECK: .extern .const .b8 array_constant_float[40];
+@array_constant_float = external addrspace(1) constant [10 x float]
+
+;CHECK: .extern .local .b8 array_local_float[40];
+@array_local_float = external addrspace(2) global [10 x float]
+
+;CHECK: .extern .shared .b8 array_shared_float[40];
+@array_shared_float = external addrspace(4) global [10 x float]
+
+;CHECK: .extern .global .b8 array_double[80];
+@array_double = external global [10 x double]
+
+;CHECK: .extern .const .b8 array_constant_double[80];
+@array_constant_double = external addrspace(1) constant [10 x double]
+
+;CHECK: .extern .local .b8 array_local_double[80];
+@array_local_double = external addrspace(2) global [10 x double]
+
+;CHECK: .extern .shared .b8 array_shared_double[80];
+@array_shared_double = external addrspace(4) global [10 x double]
+
+
+define ptx_device i16 @t1_u16(i16* %p) {
entry:
-;CHECK: ld.global.s32 r0, [r1];
+;CHECK: ld.global.u16 rh0, [r1];
+;CHECK-NEXT: ret;
+ %x = load i16* %p
+ ret i16 %x
+}
+
+define ptx_device i32 @t1_u32(i32* %p) {
+entry:
+;CHECK: ld.global.u32 r0, [r1];
+;CHECK-NEXT: ret;
%x = load i32* %p
ret i32 %x
}
-define ptx_device i32 @t2(i32* %p) {
+define ptx_device i64 @t1_u64(i64* %p) {
+entry:
+;CHECK: ld.global.u64 rd0, [r1];
+;CHECK-NEXT: ret;
+ %x = load i64* %p
+ ret i64 %x
+}
+
+define ptx_device float @t1_f32(float* %p) {
+entry:
+;CHECK: ld.global.f32 f0, [r1];
+;CHECK-NEXT: ret;
+ %x = load float* %p
+ ret float %x
+}
+
+define ptx_device double @t1_f64(double* %p) {
+entry:
+;CHECK: ld.global.f64 fd0, [r1];
+;CHECK-NEXT: ret;
+ %x = load double* %p
+ ret double %x
+}
+
+define ptx_device i16 @t2_u16(i16* %p) {
entry:
-;CHECK: ld.global.s32 r0, [r1+4];
+;CHECK: ld.global.u16 rh0, [r1+2];
+;CHECK-NEXT: ret;
+ %i = getelementptr i16* %p, i32 1
+ %x = load i16* %i
+ ret i16 %x
+}
+
+define ptx_device i32 @t2_u32(i32* %p) {
+entry:
+;CHECK: ld.global.u32 r0, [r1+4];
+;CHECK-NEXT: ret;
%i = getelementptr i32* %p, i32 1
%x = load i32* %i
ret i32 %x
}
-define ptx_device i32 @t3(i32* %p, i32 %q) {
+define ptx_device i64 @t2_u64(i64* %p) {
+entry:
+;CHECK: ld.global.u64 rd0, [r1+8];
+;CHECK-NEXT: ret;
+ %i = getelementptr i64* %p, i32 1
+ %x = load i64* %i
+ ret i64 %x
+}
+
+define ptx_device float @t2_f32(float* %p) {
+entry:
+;CHECK: ld.global.f32 f0, [r1+4];
+;CHECK-NEXT: ret;
+ %i = getelementptr float* %p, i32 1
+ %x = load float* %i
+ ret float %x
+}
+
+define ptx_device double @t2_f64(double* %p) {
+entry:
+;CHECK: ld.global.f64 fd0, [r1+8];
+;CHECK-NEXT: ret;
+ %i = getelementptr double* %p, i32 1
+ %x = load double* %i
+ ret double %x
+}
+
+define ptx_device i16 @t3_u16(i16* %p, i32 %q) {
+entry:
+;CHECK: shl.b32 r0, r2, 1;
+;CHECK-NEXT: add.u32 r0, r1, r0;
+;CHECK-NEXT: ld.global.u16 rh0, [r0];
+ %i = getelementptr i16* %p, i32 %q
+ %x = load i16* %i
+ ret i16 %x
+}
+
+define ptx_device i32 @t3_u32(i32* %p, i32 %q) {
entry:
;CHECK: shl.b32 r0, r2, 2;
-;CHECK: add.s32 r0, r1, r0;
-;CHECK: ld.global.s32 r0, [r0];
+;CHECK-NEXT: add.u32 r0, r1, r0;
+;CHECK-NEXT: ld.global.u32 r0, [r0];
%i = getelementptr i32* %p, i32 %q
%x = load i32* %i
ret i32 %x
}
-define ptx_device i32 @t4_global() {
+define ptx_device i64 @t3_u64(i64* %p, i32 %q) {
+entry:
+;CHECK: shl.b32 r0, r2, 3;
+;CHECK-NEXT: add.u32 r0, r1, r0;
+;CHECK-NEXT: ld.global.u64 rd0, [r0];
+ %i = getelementptr i64* %p, i32 %q
+ %x = load i64* %i
+ ret i64 %x
+}
+
+define ptx_device float @t3_f32(float* %p, i32 %q) {
+entry:
+;CHECK: shl.b32 r0, r2, 2;
+;CHECK-NEXT: add.u32 r0, r1, r0;
+;CHECK-NEXT: ld.global.f32 f0, [r0];
+ %i = getelementptr float* %p, i32 %q
+ %x = load float* %i
+ ret float %x
+}
+
+define ptx_device double @t3_f64(double* %p, i32 %q) {
+entry:
+;CHECK: shl.b32 r0, r2, 3;
+;CHECK-NEXT: add.u32 r0, r1, r0;
+;CHECK-NEXT: ld.global.f64 fd0, [r0];
+ %i = getelementptr double* %p, i32 %q
+ %x = load double* %i
+ ret double %x
+}
+
+define ptx_device i16 @t4_global_u16() {
+entry:
+;CHECK: mov.u32 r0, array_i16;
+;CHECK-NEXT: ld.global.u16 rh0, [r0];
+;CHECK-NEXT: ret;
+ %i = getelementptr [10 x i16]* @array_i16, i32 0, i32 0
+ %x = load i16* %i
+ ret i16 %x
+}
+
+define ptx_device i32 @t4_global_u32() {
entry:
-;CHECK: ld.global.s32 r0, [array];
- %i = getelementptr [10 x i32]* @array, i32 0, i32 0
+;CHECK: mov.u32 r0, array_i32;
+;CHECK-NEXT: ld.global.u32 r0, [r0];
+;CHECK-NEXT: ret;
+ %i = getelementptr [10 x i32]* @array_i32, i32 0, i32 0
%x = load i32* %i
ret i32 %x
}
-define ptx_device i32 @t4_const() {
+define ptx_device i64 @t4_global_u64() {
entry:
-;CHECK: ld.const.s32 r0, [array_constant];
- %i = getelementptr [10 x i32] addrspace(1)* @array_constant, i32 0, i32 0
+;CHECK: mov.u32 r0, array_i64;
+;CHECK-NEXT: ld.global.u64 rd0, [r0];
+;CHECK-NEXT: ret;
+ %i = getelementptr [10 x i64]* @array_i64, i32 0, i32 0
+ %x = load i64* %i
+ ret i64 %x
+}
+
+define ptx_device float @t4_global_f32() {
+entry:
+;CHECK: mov.u32 r0, array_float;
+;CHECK-NEXT: ld.global.f32 f0, [r0];
+;CHECK-NEXT: ret;
+ %i = getelementptr [10 x float]* @array_float, i32 0, i32 0
+ %x = load float* %i
+ ret float %x
+}
+
+define ptx_device double @t4_global_f64() {
+entry:
+;CHECK: mov.u32 r0, array_double;
+;CHECK-NEXT: ld.global.f64 fd0, [r0];
+;CHECK-NEXT: ret;
+ %i = getelementptr [10 x double]* @array_double, i32 0, i32 0
+ %x = load double* %i
+ ret double %x
+}
+
+define ptx_device i16 @t4_const_u16() {
+entry:
+;CHECK: mov.u32 r0, array_constant_i16;
+;CHECK-NEXT: ld.const.u16 rh0, [r0];
+;CHECK-NEXT: ret;
+ %i = getelementptr [10 x i16] addrspace(1)* @array_constant_i16, i32 0, i32 0
+ %x = load i16 addrspace(1)* %i
+ ret i16 %x
+}
+
+define ptx_device i32 @t4_const_u32() {
+entry:
+;CHECK: mov.u32 r0, array_constant_i32;
+;CHECK-NEXT: ld.const.u32 r0, [r0];
+;CHECK-NEXT: ret;
+ %i = getelementptr [10 x i32] addrspace(1)* @array_constant_i32, i32 0, i32 0
%x = load i32 addrspace(1)* %i
ret i32 %x
}
-define ptx_device i32 @t4_local() {
+define ptx_device i64 @t4_const_u64() {
+entry:
+;CHECK: mov.u32 r0, array_constant_i64;
+;CHECK-NEXT: ld.const.u64 rd0, [r0];
+;CHECK-NEXT: ret;
+ %i = getelementptr [10 x i64] addrspace(1)* @array_constant_i64, i32 0, i32 0
+ %x = load i64 addrspace(1)* %i
+ ret i64 %x
+}
+
+define ptx_device float @t4_const_f32() {
entry:
-;CHECK: ld.local.s32 r0, [array_local];
- %i = getelementptr [10 x i32] addrspace(2)* @array_local, i32 0, i32 0
+;CHECK: mov.u32 r0, array_constant_float;
+;CHECK-NEXT: ld.const.f32 f0, [r0];
+;CHECK-NEXT: ret;
+ %i = getelementptr [10 x float] addrspace(1)* @array_constant_float, i32 0, i32 0
+ %x = load float addrspace(1)* %i
+ ret float %x
+}
+
+define ptx_device double @t4_const_f64() {
+entry:
+;CHECK: mov.u32 r0, array_constant_double;
+;CHECK-NEXT: ld.const.f64 fd0, [r0];
+;CHECK-NEXT: ret;
+ %i = getelementptr [10 x double] addrspace(1)* @array_constant_double, i32 0, i32 0
+ %x = load double addrspace(1)* %i
+ ret double %x
+}
+
+define ptx_device i16 @t4_local_u16() {
+entry:
+;CHECK: mov.u32 r0, array_local_i16;
+;CHECK-NEXT: ld.local.u16 rh0, [r0];
+;CHECK-NEXT: ret;
+ %i = getelementptr [10 x i16] addrspace(2)* @array_local_i16, i32 0, i32 0
+ %x = load i16 addrspace(2)* %i
+ ret i16 %x
+}
+
+define ptx_device i32 @t4_local_u32() {
+entry:
+;CHECK: mov.u32 r0, array_local_i32;
+;CHECK-NEXT: ld.local.u32 r0, [r0];
+;CHECK-NEXT: ret;
+ %i = getelementptr [10 x i32] addrspace(2)* @array_local_i32, i32 0, i32 0
%x = load i32 addrspace(2)* %i
ret i32 %x
}
-define ptx_device i32 @t4_shared() {
+define ptx_device i64 @t4_local_u64() {
entry:
-;CHECK: ld.shared.s32 r0, [array_shared];
- %i = getelementptr [10 x i32] addrspace(4)* @array_shared, i32 0, i32 0
+;CHECK: mov.u32 r0, array_local_i64;
+;CHECK-NEXT: ld.local.u64 rd0, [r0];
+;CHECK-NEXT: ret;
+ %i = getelementptr [10 x i64] addrspace(2)* @array_local_i64, i32 0, i32 0
+ %x = load i64 addrspace(2)* %i
+ ret i64 %x
+}
+
+define ptx_device float @t4_local_f32() {
+entry:
+;CHECK: mov.u32 r0, array_local_float;
+;CHECK-NEXT: ld.local.f32 f0, [r0];
+;CHECK-NEXT: ret;
+ %i = getelementptr [10 x float] addrspace(2)* @array_local_float, i32 0, i32 0
+ %x = load float addrspace(2)* %i
+ ret float %x
+}
+
+define ptx_device double @t4_local_f64() {
+entry:
+;CHECK: mov.u32 r0, array_local_double;
+;CHECK-NEXT: ld.local.f64 fd0, [r0];
+;CHECK-NEXT: ret;
+ %i = getelementptr [10 x double] addrspace(2)* @array_local_double, i32 0, i32 0
+ %x = load double addrspace(2)* %i
+ ret double %x
+}
+
+define ptx_device i16 @t4_shared_u16() {
+entry:
+;CHECK: mov.u32 r0, array_shared_i16;
+;CHECK-NEXT: ld.shared.u16 rh0, [r0];
+;CHECK-NEXT: ret;
+ %i = getelementptr [10 x i16] addrspace(4)* @array_shared_i16, i32 0, i32 0
+ %x = load i16 addrspace(4)* %i
+ ret i16 %x
+}
+
+define ptx_device i32 @t4_shared_u32() {
+entry:
+;CHECK: mov.u32 r0, array_shared_i32;
+;CHECK-NEXT: ld.shared.u32 r0, [r0];
+;CHECK-NEXT: ret;
+ %i = getelementptr [10 x i32] addrspace(4)* @array_shared_i32, i32 0, i32 0
%x = load i32 addrspace(4)* %i
ret i32 %x
}
-define ptx_device i32 @t5() {
+define ptx_device i64 @t4_shared_u64() {
+entry:
+;CHECK: mov.u32 r0, array_shared_i64;
+;CHECK-NEXT: ld.shared.u64 rd0, [r0];
+;CHECK-NEXT: ret;
+ %i = getelementptr [10 x i64] addrspace(4)* @array_shared_i64, i32 0, i32 0
+ %x = load i64 addrspace(4)* %i
+ ret i64 %x
+}
+
+define ptx_device float @t4_shared_f32() {
+entry:
+;CHECK: mov.u32 r0, array_shared_float;
+;CHECK-NEXT: ld.shared.f32 f0, [r0];
+;CHECK-NEXT: ret;
+ %i = getelementptr [10 x float] addrspace(4)* @array_shared_float, i32 0, i32 0
+ %x = load float addrspace(4)* %i
+ ret float %x
+}
+
+define ptx_device double @t4_shared_f64() {
+entry:
+;CHECK: mov.u32 r0, array_shared_double;
+;CHECK-NEXT: ld.shared.f64 fd0, [r0];
+;CHECK-NEXT: ret;
+ %i = getelementptr [10 x double] addrspace(4)* @array_shared_double, i32 0, i32 0
+ %x = load double addrspace(4)* %i
+ ret double %x
+}
+
+define ptx_device i16 @t5_u16() {
entry:
-;CHECK: ld.global.s32 r0, [array+4];
- %i = getelementptr [10 x i32]* @array, i32 0, i32 1
+;CHECK: mov.u32 r0, array_i16;
+;CHECK-NEXT: ld.global.u16 rh0, [r0+2];
+;CHECK-NEXT: ret;
+ %i = getelementptr [10 x i16]* @array_i16, i32 0, i32 1
+ %x = load i16* %i
+ ret i16 %x
+}
+
+define ptx_device i32 @t5_u32() {
+entry:
+;CHECK: mov.u32 r0, array_i32;
+;CHECK-NEXT: ld.global.u32 r0, [r0+4];
+;CHECK-NEXT: ret;
+ %i = getelementptr [10 x i32]* @array_i32, i32 0, i32 1
%x = load i32* %i
ret i32 %x
}
+
+define ptx_device i64 @t5_u64() {
+entry:
+;CHECK: mov.u32 r0, array_i64;
+;CHECK-NEXT: ld.global.u64 rd0, [r0+8];
+;CHECK-NEXT: ret;
+ %i = getelementptr [10 x i64]* @array_i64, i32 0, i32 1
+ %x = load i64* %i
+ ret i64 %x
+}
+
+define ptx_device float @t5_f32() {
+entry:
+;CHECK: mov.u32 r0, array_float;
+;CHECK-NEXT: ld.global.f32 f0, [r0+4];
+;CHECK-NEXT: ret;
+ %i = getelementptr [10 x float]* @array_float, i32 0, i32 1
+ %x = load float* %i
+ ret float %x
+}
+
+define ptx_device double @t5_f64() {
+entry:
+;CHECK: mov.u32 r0, array_double;
+;CHECK-NEXT: ld.global.f64 fd0, [r0+8];
+;CHECK-NEXT: ret;
+ %i = getelementptr [10 x double]* @array_double, i32 0, i32 1
+ %x = load double* %i
+ ret double %x
+}
diff --git a/test/CodeGen/PTX/llvm-intrinsic.ll b/test/CodeGen/PTX/llvm-intrinsic.ll
new file mode 100644
index 000000000000..1e265f5b7b3a
--- /dev/null
+++ b/test/CodeGen/PTX/llvm-intrinsic.ll
@@ -0,0 +1,56 @@
+; RUN: llc < %s -march=ptx32 -mattr=+ptx20,+sm20 | FileCheck %s
+
+define ptx_device float @test_sqrt_f32(float %x) {
+entry:
+; CHECK: sqrt.rn.f32 f0, f1;
+; CHECK-NEXT: ret;
+ %y = call float @llvm.sqrt.f32(float %x)
+ ret float %y
+}
+
+define ptx_device double @test_sqrt_f64(double %x) {
+entry:
+; CHECK: sqrt.rn.f64 fd0, fd1;
+; CHECK-NEXT: ret;
+ %y = call double @llvm.sqrt.f64(double %x)
+ ret double %y
+}
+
+define ptx_device float @test_sin_f32(float %x) {
+entry:
+; CHECK: sin.approx.f32 f0, f1;
+; CHECK-NEXT: ret;
+ %y = call float @llvm.sin.f32(float %x)
+ ret float %y
+}
+
+define ptx_device double @test_sin_f64(double %x) {
+entry:
+; CHECK: sin.approx.f64 fd0, fd1;
+; CHECK-NEXT: ret;
+ %y = call double @llvm.sin.f64(double %x)
+ ret double %y
+}
+
+define ptx_device float @test_cos_f32(float %x) {
+entry:
+; CHECK: cos.approx.f32 f0, f1;
+; CHECK-NEXT: ret;
+ %y = call float @llvm.cos.f32(float %x)
+ ret float %y
+}
+
+define ptx_device double @test_cos_f64(double %x) {
+entry:
+; CHECK: cos.approx.f64 fd0, fd1;
+; CHECK-NEXT: ret;
+ %y = call double @llvm.cos.f64(double %x)
+ ret double %y
+}
+
+declare float @llvm.sqrt.f32(float)
+declare double @llvm.sqrt.f64(double)
+declare float @llvm.sin.f32(float)
+declare double @llvm.sin.f64(double)
+declare float @llvm.cos.f32(float)
+declare double @llvm.cos.f64(double)
diff --git a/test/CodeGen/PTX/mad.ll b/test/CodeGen/PTX/mad.ll
new file mode 100644
index 000000000000..0c25f2c0030a
--- /dev/null
+++ b/test/CodeGen/PTX/mad.ll
@@ -0,0 +1,17 @@
+; RUN: llc < %s -march=ptx32 -mattr=+sm13 | FileCheck %s
+
+define ptx_device float @t1_f32(float %x, float %y, float %z) {
+; CHECK: mad.rn.f32 f0, f1, f2, f3;
+; CHECK-NEXT: ret;
+ %a = fmul float %x, %y
+ %b = fadd float %a, %z
+ ret float %b
+}
+
+define ptx_device double @t1_f64(double %x, double %y, double %z) {
+; CHECK: mad.rn.f64 fd0, fd1, fd2, fd3;
+; CHECK-NEXT: ret;
+ %a = fmul double %x, %y
+ %b = fadd double %a, %z
+ ret double %b
+}
diff --git a/test/CodeGen/PTX/mov.ll b/test/CodeGen/PTX/mov.ll
index c365e9beb897..120572a0e868 100644
--- a/test/CodeGen/PTX/mov.ll
+++ b/test/CodeGen/PTX/mov.ll
@@ -1,13 +1,62 @@
-; RUN: llc < %s -march=ptx | FileCheck %s
+; RUN: llc < %s -march=ptx32 | FileCheck %s
-define ptx_device i32 @t1() {
-; CHECK: mov.s32 r0, 0;
+define ptx_device i16 @t1_u16() {
+; CHECK: mov.u16 rh0, 0;
+; CHECK: ret;
+ ret i16 0
+}
+
+define ptx_device i32 @t1_u32() {
+; CHECK: mov.u32 r0, 0;
; CHECK: ret;
ret i32 0
}
-define ptx_device i32 @t2(i32 %x) {
-; CHECK: mov.s32 r0, r1;
+define ptx_device i64 @t1_u64() {
+; CHECK: mov.u64 rd0, 0;
+; CHECK: ret;
+ ret i64 0
+}
+
+define ptx_device float @t1_f32() {
+; CHECK: mov.f32 f0, 0F00000000;
+; CHECK: ret;
+ ret float 0.0
+}
+
+define ptx_device double @t1_f64() {
+; CHECK: mov.f64 fd0, 0D0000000000000000;
+; CHECK: ret;
+ ret double 0.0
+}
+
+define ptx_device i16 @t2_u16(i16 %x) {
+; CHECK: mov.u16 rh0, rh1;
+; CHECK: ret;
+ ret i16 %x
+}
+
+define ptx_device i32 @t2_u32(i32 %x) {
+; CHECK: mov.u32 r0, r1;
; CHECK: ret;
ret i32 %x
}
+
+define ptx_device i64 @t2_u64(i64 %x) {
+; CHECK: mov.u64 rd0, rd1;
+; CHECK: ret;
+ ret i64 %x
+}
+
+define ptx_device float @t3_f32(float %x) {
+; CHECK: mov.f32 f0, f1;
+; CHECK-NEXT: ret;
+ ret float %x
+}
+
+define ptx_device double @t3_f64(double %x) {
+; CHECK: mov.f64 fd0, fd1;
+; CHECK-NEXT: ret;
+ ret double %x
+}
+
diff --git a/test/CodeGen/PTX/mul.ll b/test/CodeGen/PTX/mul.ll
new file mode 100644
index 000000000000..5ce042675dc8
--- /dev/null
+++ b/test/CodeGen/PTX/mul.ll
@@ -0,0 +1,39 @@
+; RUN: llc < %s -march=ptx32 | FileCheck %s
+
+;define ptx_device i32 @t1(i32 %x, i32 %y) {
+; %z = mul i32 %x, %y
+; ret i32 %z
+;}
+
+;define ptx_device i32 @t2(i32 %x) {
+; %z = mul i32 %x, 1
+; ret i32 %z
+;}
+
+define ptx_device float @t1_f32(float %x, float %y) {
+; CHECK: mul.f32 f0, f1, f2
+; CHECK-NEXT: ret;
+ %z = fmul float %x, %y
+ ret float %z
+}
+
+define ptx_device double @t1_f64(double %x, double %y) {
+; CHECK: mul.f64 fd0, fd1, fd2
+; CHECK-NEXT: ret;
+ %z = fmul double %x, %y
+ ret double %z
+}
+
+define ptx_device float @t2_f32(float %x) {
+; CHECK: mul.f32 f0, f1, 0F40A00000;
+; CHECK-NEXT: ret;
+ %z = fmul float %x, 5.0
+ ret float %z
+}
+
+define ptx_device double @t2_f64(double %x) {
+; CHECK: mul.f64 fd0, fd1, 0D4014000000000000;
+; CHECK-NEXT: ret;
+ %z = fmul double %x, 5.0
+ ret double %z
+}
diff --git a/test/CodeGen/PTX/options.ll b/test/CodeGen/PTX/options.ll
index a14d5c9c27ba..ac33fef0d6e3 100644
--- a/test/CodeGen/PTX/options.ll
+++ b/test/CodeGen/PTX/options.ll
@@ -1,5 +1,9 @@
-; RUN: llc < %s -march=ptx -ptx-version=2.0 | grep ".version 2.0"
-; RUN: llc < %s -march=ptx -ptx-target=sm_20 | grep ".target sm_20"
+; RUN: llc < %s -march=ptx32 -mattr=ptx20 | grep ".version 2.0"
+; RUN: llc < %s -march=ptx32 -mattr=ptx21 | grep ".version 2.1"
+; RUN: llc < %s -march=ptx32 -mattr=ptx22 | grep ".version 2.2"
+; RUN: llc < %s -march=ptx32 -mattr=sm10 | grep ".target sm_10"
+; RUN: llc < %s -march=ptx32 -mattr=sm13 | grep ".target sm_13"
+; RUN: llc < %s -march=ptx32 -mattr=sm20 | grep ".target sm_20"
define ptx_device void @t1() {
ret void
diff --git a/test/CodeGen/PTX/parameter-order.ll b/test/CodeGen/PTX/parameter-order.ll
new file mode 100644
index 000000000000..95d4a328149c
--- /dev/null
+++ b/test/CodeGen/PTX/parameter-order.ll
@@ -0,0 +1,8 @@
+; RUN: llc < %s -march=ptx32 | FileCheck %s
+
+; CHECK: .func (.reg .u32 r0) test_parameter_order (.reg .f32 f1, .reg .u32 r1, .reg .u32 r2, .reg .f32 f2)
+define ptx_device i32 @test_parameter_order(float %a, i32 %b, i32 %c, float %d) {
+; CHECK: sub.u32 r0, r1, r2
+ %result = sub i32 %b, %c
+ ret i32 %result
+}
diff --git a/test/CodeGen/PTX/ret.ll b/test/CodeGen/PTX/ret.ll
index d5037f25fd36..ba0523f6424a 100644
--- a/test/CodeGen/PTX/ret.ll
+++ b/test/CodeGen/PTX/ret.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -march=ptx | FileCheck %s
+; RUN: llc < %s -march=ptx32 | FileCheck %s
define ptx_device void @t1() {
; CHECK: ret;
diff --git a/test/CodeGen/PTX/setp.ll b/test/CodeGen/PTX/setp.ll
new file mode 100644
index 000000000000..5836122049e6
--- /dev/null
+++ b/test/CodeGen/PTX/setp.ll
@@ -0,0 +1,134 @@
+; RUN: llc < %s -march=ptx32 | FileCheck %s
+
+define ptx_device i32 @test_setp_eq_u32_rr(i32 %x, i32 %y) {
+; CHECK: setp.eq.u32 p0, r1, r2;
+; CHECK-NEXT: cvt.u32.pred r0, p0;
+; CHECK-NEXT: ret;
+ %p = icmp eq i32 %x, %y
+ %z = zext i1 %p to i32
+ ret i32 %z
+}
+
+define ptx_device i32 @test_setp_ne_u32_rr(i32 %x, i32 %y) {
+; CHECK: setp.ne.u32 p0, r1, r2;
+; CHECK-NEXT: cvt.u32.pred r0, p0;
+; CHECK-NEXT: ret;
+ %p = icmp ne i32 %x, %y
+ %z = zext i1 %p to i32
+ ret i32 %z
+}
+
+define ptx_device i32 @test_setp_lt_u32_rr(i32 %x, i32 %y) {
+; CHECK: setp.lt.u32 p0, r1, r2;
+; CHECK-NEXT: cvt.u32.pred r0, p0;
+; CHECK-NEXT: ret;
+ %p = icmp ult i32 %x, %y
+ %z = zext i1 %p to i32
+ ret i32 %z
+}
+
+define ptx_device i32 @test_setp_le_u32_rr(i32 %x, i32 %y) {
+; CHECK: setp.le.u32 p0, r1, r2;
+; CHECK-NEXT: cvt.u32.pred r0, p0;
+; CHECK-NEXT: ret;
+ %p = icmp ule i32 %x, %y
+ %z = zext i1 %p to i32
+ ret i32 %z
+}
+
+define ptx_device i32 @test_setp_gt_u32_rr(i32 %x, i32 %y) {
+; CHECK: setp.gt.u32 p0, r1, r2;
+; CHECK-NEXT: cvt.u32.pred r0, p0;
+; CHECK-NEXT: ret;
+ %p = icmp ugt i32 %x, %y
+ %z = zext i1 %p to i32
+ ret i32 %z
+}
+
+define ptx_device i32 @test_setp_ge_u32_rr(i32 %x, i32 %y) {
+; CHECK: setp.ge.u32 p0, r1, r2;
+; CHECK-NEXT: cvt.u32.pred r0, p0;
+; CHECK-NEXT: ret;
+ %p = icmp uge i32 %x, %y
+ %z = zext i1 %p to i32
+ ret i32 %z
+}
+
+define ptx_device i32 @test_setp_eq_u32_ri(i32 %x) {
+; CHECK: setp.eq.u32 p0, r1, 1;
+; CHECK-NEXT: cvt.u32.pred r0, p0;
+; CHECK-NEXT: ret;
+ %p = icmp eq i32 %x, 1
+ %z = zext i1 %p to i32
+ ret i32 %z
+}
+
+define ptx_device i32 @test_setp_ne_u32_ri(i32 %x) {
+; CHECK: setp.ne.u32 p0, r1, 1;
+; CHECK-NEXT: cvt.u32.pred r0, p0;
+; CHECK-NEXT: ret;
+ %p = icmp ne i32 %x, 1
+ %z = zext i1 %p to i32
+ ret i32 %z
+}
+
+define ptx_device i32 @test_setp_lt_u32_ri(i32 %x) {
+; CHECK: setp.eq.u32 p0, r1, 0;
+; CHECK-NEXT: cvt.u32.pred r0, p0;
+; CHECK-NEXT: ret;
+ %p = icmp ult i32 %x, 1
+ %z = zext i1 %p to i32
+ ret i32 %z
+}
+
+define ptx_device i32 @test_setp_le_u32_ri(i32 %x) {
+; CHECK: setp.lt.u32 p0, r1, 2;
+; CHECK-NEXT: cvt.u32.pred r0, p0;
+; CHECK-NEXT: ret;
+ %p = icmp ule i32 %x, 1
+ %z = zext i1 %p to i32
+ ret i32 %z
+}
+
+define ptx_device i32 @test_setp_gt_u32_ri(i32 %x) {
+; CHECK: setp.gt.u32 p0, r1, 1;
+; CHECK-NEXT: cvt.u32.pred r0, p0;
+; CHECK-NEXT: ret;
+ %p = icmp ugt i32 %x, 1
+ %z = zext i1 %p to i32
+ ret i32 %z
+}
+
+define ptx_device i32 @test_setp_ge_u32_ri(i32 %x) {
+; CHECK: setp.ne.u32 p0, r1, 0;
+; CHECK-NEXT: cvt.u32.pred r0, p0;
+; CHECK-NEXT: ret;
+ %p = icmp uge i32 %x, 1
+ %z = zext i1 %p to i32
+ ret i32 %z
+}
+
+define ptx_device i32 @test_setp_4_op_format_1(i32 %x, i32 %y, i32 %u, i32 %v) {
+; CHECK: setp.gt.u32 p0, r3, r4;
+; CHECK-NEXT: setp.eq.and.u32 p0, r1, r2, p0;
+; CHECK-NEXT: cvt.u32.pred r0, p0;
+; CHECK-NEXT: ret;
+ %c = icmp eq i32 %x, %y
+ %d = icmp ugt i32 %u, %v
+ %e = and i1 %c, %d
+ %z = zext i1 %e to i32
+ ret i32 %z
+}
+
+define ptx_device i32 @test_setp_4_op_format_2(i32 %x, i32 %y, i32 %w) {
+; CHECK: cvt.pred.u32 p0, r3;
+; CHECK-NEXT: setp.eq.and.u32 p0, r1, r2, !p0;
+; CHECK-NEXT: cvt.u32.pred r0, p0;
+; CHECK-NEXT: ret;
+ %c = trunc i32 %w to i1
+ %d = icmp eq i32 %x, %y
+ %e = xor i1 %c, 1
+ %f = and i1 %d, %e
+ %z = zext i1 %f to i32
+ ret i32 %z
+}
diff --git a/test/CodeGen/PTX/shl.ll b/test/CodeGen/PTX/shl.ll
index b564b43ab932..6e72c9221325 100644
--- a/test/CodeGen/PTX/shl.ll
+++ b/test/CodeGen/PTX/shl.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -march=ptx | FileCheck %s
+; RUN: llc < %s -march=ptx32 | FileCheck %s
define ptx_device i32 @t1(i32 %x, i32 %y) {
; CHECK: shl.b32 r0, r1, r2
diff --git a/test/CodeGen/PTX/shr.ll b/test/CodeGen/PTX/shr.ll
index 3f8ade862b75..8693e0ecf49a 100644
--- a/test/CodeGen/PTX/shr.ll
+++ b/test/CodeGen/PTX/shr.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -march=ptx | FileCheck %s
+; RUN: llc < %s -march=ptx32 | FileCheck %s
define ptx_device i32 @t1(i32 %x, i32 %y) {
; CHECK: shr.u32 r0, r1, r2
diff --git a/test/CodeGen/PTX/st.ll b/test/CodeGen/PTX/st.ll
index 2cbacb9ee59c..dee5c61abe66 100644
--- a/test/CodeGen/PTX/st.ll
+++ b/test/CodeGen/PTX/st.ll
@@ -1,71 +1,402 @@
-; RUN: llc < %s -march=ptx | FileCheck %s
+; RUN: llc < %s -march=ptx32 | FileCheck %s
-;CHECK: .extern .global .s32 array[];
-@array = external global [10 x i32]
+;CHECK: .extern .global .b8 array_i16[20];
+@array_i16 = external global [10 x i16]
-;CHECK: .extern .const .s32 array_constant[];
-@array_constant = external addrspace(1) constant [10 x i32]
+;CHECK: .extern .const .b8 array_constant_i16[20];
+@array_constant_i16 = external addrspace(1) constant [10 x i16]
-;CHECK: .extern .local .s32 array_local[];
-@array_local = external addrspace(2) global [10 x i32]
+;CHECK: .extern .local .b8 array_local_i16[20];
+@array_local_i16 = external addrspace(2) global [10 x i16]
-;CHECK: .extern .shared .s32 array_shared[];
-@array_shared = external addrspace(4) global [10 x i32]
+;CHECK: .extern .shared .b8 array_shared_i16[20];
+@array_shared_i16 = external addrspace(4) global [10 x i16]
-define ptx_device void @t1(i32* %p, i32 %x) {
+;CHECK: .extern .global .b8 array_i32[40];
+@array_i32 = external global [10 x i32]
+
+;CHECK: .extern .const .b8 array_constant_i32[40];
+@array_constant_i32 = external addrspace(1) constant [10 x i32]
+
+;CHECK: .extern .local .b8 array_local_i32[40];
+@array_local_i32 = external addrspace(2) global [10 x i32]
+
+;CHECK: .extern .shared .b8 array_shared_i32[40];
+@array_shared_i32 = external addrspace(4) global [10 x i32]
+
+;CHECK: .extern .global .b8 array_i64[80];
+@array_i64 = external global [10 x i64]
+
+;CHECK: .extern .const .b8 array_constant_i64[80];
+@array_constant_i64 = external addrspace(1) constant [10 x i64]
+
+;CHECK: .extern .local .b8 array_local_i64[80];
+@array_local_i64 = external addrspace(2) global [10 x i64]
+
+;CHECK: .extern .shared .b8 array_shared_i64[80];
+@array_shared_i64 = external addrspace(4) global [10 x i64]
+
+;CHECK: .extern .global .b8 array_float[40];
+@array_float = external global [10 x float]
+
+;CHECK: .extern .const .b8 array_constant_float[40];
+@array_constant_float = external addrspace(1) constant [10 x float]
+
+;CHECK: .extern .local .b8 array_local_float[40];
+@array_local_float = external addrspace(2) global [10 x float]
+
+;CHECK: .extern .shared .b8 array_shared_float[40];
+@array_shared_float = external addrspace(4) global [10 x float]
+
+;CHECK: .extern .global .b8 array_double[80];
+@array_double = external global [10 x double]
+
+;CHECK: .extern .const .b8 array_constant_double[80];
+@array_constant_double = external addrspace(1) constant [10 x double]
+
+;CHECK: .extern .local .b8 array_local_double[80];
+@array_local_double = external addrspace(2) global [10 x double]
+
+;CHECK: .extern .shared .b8 array_shared_double[80];
+@array_shared_double = external addrspace(4) global [10 x double]
+
+
+define ptx_device void @t1_u16(i16* %p, i16 %x) {
entry:
-;CHECK: st.global.s32 [r1], r2;
+;CHECK: st.global.u16 [r1], rh1;
+;CHECK-NEXT: ret;
+ store i16 %x, i16* %p
+ ret void
+}
+
+define ptx_device void @t1_u32(i32* %p, i32 %x) {
+entry:
+;CHECK: st.global.u32 [r1], r2;
+;CHECK-NEXT: ret;
store i32 %x, i32* %p
ret void
}
-define ptx_device void @t2(i32* %p, i32 %x) {
+define ptx_device void @t1_u64(i64* %p, i64 %x) {
+entry:
+;CHECK: st.global.u64 [r1], rd1;
+;CHECK-NEXT: ret;
+ store i64 %x, i64* %p
+ ret void
+}
+
+define ptx_device void @t1_f32(float* %p, float %x) {
+entry:
+;CHECK: st.global.f32 [r1], f1;
+;CHECK-NEXT: ret;
+ store float %x, float* %p
+ ret void
+}
+
+define ptx_device void @t1_f64(double* %p, double %x) {
+entry:
+;CHECK: st.global.f64 [r1], fd1;
+;CHECK-NEXT: ret;
+ store double %x, double* %p
+ ret void
+}
+
+define ptx_device void @t2_u16(i16* %p, i16 %x) {
entry:
-;CHECK: st.global.s32 [r1+4], r2;
+;CHECK: st.global.u16 [r1+2], rh1;
+;CHECK-NEXT: ret;
+ %i = getelementptr i16* %p, i32 1
+ store i16 %x, i16* %i
+ ret void
+}
+
+define ptx_device void @t2_u32(i32* %p, i32 %x) {
+entry:
+;CHECK: st.global.u32 [r1+4], r2;
+;CHECK-NEXT: ret;
%i = getelementptr i32* %p, i32 1
store i32 %x, i32* %i
ret void
}
-define ptx_device void @t3(i32* %p, i32 %q, i32 %x) {
-;CHECK: .reg .s32 r0;
+define ptx_device void @t2_u64(i64* %p, i64 %x) {
+entry:
+;CHECK: st.global.u64 [r1+8], rd1;
+;CHECK-NEXT: ret;
+ %i = getelementptr i64* %p, i32 1
+ store i64 %x, i64* %i
+ ret void
+}
+
+define ptx_device void @t2_f32(float* %p, float %x) {
+entry:
+;CHECK: st.global.f32 [r1+4], f1;
+;CHECK-NEXT: ret;
+ %i = getelementptr float* %p, i32 1
+ store float %x, float* %i
+ ret void
+}
+
+define ptx_device void @t2_f64(double* %p, double %x) {
+entry:
+;CHECK: st.global.f64 [r1+8], fd1;
+;CHECK-NEXT: ret;
+ %i = getelementptr double* %p, i32 1
+ store double %x, double* %i
+ ret void
+}
+
+define ptx_device void @t3_u16(i16* %p, i32 %q, i16 %x) {
+entry:
+;CHECK: shl.b32 r0, r2, 1;
+;CHECK-NEXT: add.u32 r0, r1, r0;
+;CHECK-NEXT: st.global.u16 [r0], rh1;
+;CHECK-NEXT: ret;
+ %i = getelementptr i16* %p, i32 %q
+ store i16 %x, i16* %i
+ ret void
+}
+
+define ptx_device void @t3_u32(i32* %p, i32 %q, i32 %x) {
entry:
;CHECK: shl.b32 r0, r2, 2;
-;CHECK: add.s32 r0, r1, r0;
-;CHECK: st.global.s32 [r0], r3;
+;CHECK-NEXT: add.u32 r0, r1, r0;
+;CHECK-NEXT: st.global.u32 [r0], r3;
+;CHECK-NEXT: ret;
%i = getelementptr i32* %p, i32 %q
store i32 %x, i32* %i
ret void
}
-define ptx_device void @t4_global(i32 %x) {
+define ptx_device void @t3_u64(i64* %p, i32 %q, i64 %x) {
+entry:
+;CHECK: shl.b32 r0, r2, 3;
+;CHECK-NEXT: add.u32 r0, r1, r0;
+;CHECK-NEXT: st.global.u64 [r0], rd1;
+;CHECK-NEXT: ret;
+ %i = getelementptr i64* %p, i32 %q
+ store i64 %x, i64* %i
+ ret void
+}
+
+define ptx_device void @t3_f32(float* %p, i32 %q, float %x) {
+entry:
+;CHECK: shl.b32 r0, r2, 2;
+;CHECK-NEXT: add.u32 r0, r1, r0;
+;CHECK-NEXT: st.global.f32 [r0], f1;
+;CHECK-NEXT: ret;
+ %i = getelementptr float* %p, i32 %q
+ store float %x, float* %i
+ ret void
+}
+
+define ptx_device void @t3_f64(double* %p, i32 %q, double %x) {
+entry:
+;CHECK: shl.b32 r0, r2, 3;
+;CHECK-NEXT: add.u32 r0, r1, r0;
+;CHECK-NEXT: st.global.f64 [r0], fd1;
+;CHECK-NEXT: ret;
+ %i = getelementptr double* %p, i32 %q
+ store double %x, double* %i
+ ret void
+}
+
+define ptx_device void @t4_global_u16(i16 %x) {
+entry:
+;CHECK: mov.u32 r0, array_i16;
+;CHECK-NEXT: st.global.u16 [r0], rh1;
+;CHECK-NEXT: ret;
+ %i = getelementptr [10 x i16]* @array_i16, i16 0, i16 0
+ store i16 %x, i16* %i
+ ret void
+}
+
+define ptx_device void @t4_global_u32(i32 %x) {
entry:
-;CHECK: st.global.s32 [array], r1;
- %i = getelementptr [10 x i32]* @array, i32 0, i32 0
+;CHECK: mov.u32 r0, array_i32;
+;CHECK-NEXT: st.global.u32 [r0], r1;
+;CHECK-NEXT: ret;
+ %i = getelementptr [10 x i32]* @array_i32, i32 0, i32 0
store i32 %x, i32* %i
ret void
}
-define ptx_device void @t4_local(i32 %x) {
+define ptx_device void @t4_global_u64(i64 %x) {
+entry:
+;CHECK: mov.u32 r0, array_i64;
+;CHECK-NEXT: st.global.u64 [r0], rd1;
+;CHECK-NEXT: ret;
+ %i = getelementptr [10 x i64]* @array_i64, i32 0, i32 0
+ store i64 %x, i64* %i
+ ret void
+}
+
+define ptx_device void @t4_global_f32(float %x) {
+entry:
+;CHECK: mov.u32 r0, array_float;
+;CHECK-NEXT: st.global.f32 [r0], f1;
+;CHECK-NEXT: ret;
+ %i = getelementptr [10 x float]* @array_float, i32 0, i32 0
+ store float %x, float* %i
+ ret void
+}
+
+define ptx_device void @t4_global_f64(double %x) {
+entry:
+;CHECK: mov.u32 r0, array_double;
+;CHECK-NEXT: st.global.f64 [r0], fd1;
+;CHECK-NEXT: ret;
+ %i = getelementptr [10 x double]* @array_double, i32 0, i32 0
+ store double %x, double* %i
+ ret void
+}
+
+define ptx_device void @t4_local_u16(i16 %x) {
entry:
-;CHECK: st.local.s32 [array_local], r1;
- %i = getelementptr [10 x i32] addrspace(2)* @array_local, i32 0, i32 0
+;CHECK: mov.u32 r0, array_local_i16;
+;CHECK-NEXT: st.local.u16 [r0], rh1;
+;CHECK-NEXT: ret;
+ %i = getelementptr [10 x i16] addrspace(2)* @array_local_i16, i32 0, i32 0
+ store i16 %x, i16 addrspace(2)* %i
+ ret void
+}
+
+define ptx_device void @t4_local_u32(i32 %x) {
+entry:
+;CHECK: mov.u32 r0, array_local_i32;
+;CHECK-NEXT: st.local.u32 [r0], r1;
+;CHECK-NEXT: ret;
+ %i = getelementptr [10 x i32] addrspace(2)* @array_local_i32, i32 0, i32 0
store i32 %x, i32 addrspace(2)* %i
ret void
}
-define ptx_device void @t4_shared(i32 %x) {
+define ptx_device void @t4_local_u64(i64 %x) {
+entry:
+;CHECK: mov.u32 r0, array_local_i64;
+;CHECK-NEXT: st.local.u64 [r0], rd1;
+;CHECK-NEXT: ret;
+ %i = getelementptr [10 x i64] addrspace(2)* @array_local_i64, i32 0, i32 0
+ store i64 %x, i64 addrspace(2)* %i
+ ret void
+}
+
+define ptx_device void @t4_local_f32(float %x) {
+entry:
+;CHECK: mov.u32 r0, array_local_float;
+;CHECK-NEXT: st.local.f32 [r0], f1;
+;CHECK-NEXT: ret;
+ %i = getelementptr [10 x float] addrspace(2)* @array_local_float, i32 0, i32 0
+ store float %x, float addrspace(2)* %i
+ ret void
+}
+
+define ptx_device void @t4_local_f64(double %x) {
+entry:
+;CHECK: mov.u32 r0, array_local_double;
+;CHECK-NEXT: st.local.f64 [r0], fd1;
+;CHECK-NEXT: ret;
+ %i = getelementptr [10 x double] addrspace(2)* @array_local_double, i32 0, i32 0
+ store double %x, double addrspace(2)* %i
+ ret void
+}
+
+define ptx_device void @t4_shared_u16(i16 %x) {
entry:
-;CHECK: st.shared.s32 [array_shared], r1;
- %i = getelementptr [10 x i32] addrspace(4)* @array_shared, i32 0, i32 0
+;CHECK: mov.u32 r0, array_shared_i16;
+;CHECK-NEXT: st.shared.u16 [r0], rh1;
+;CHECK-NEXT: ret;
+ %i = getelementptr [10 x i16] addrspace(4)* @array_shared_i16, i32 0, i32 0
+ store i16 %x, i16 addrspace(4)* %i
+ ret void
+}
+
+define ptx_device void @t4_shared_u32(i32 %x) {
+entry:
+;CHECK: mov.u32 r0, array_shared_i32;
+;CHECK-NEXT: st.shared.u32 [r0], r1;
+;CHECK-NEXT: ret;
+ %i = getelementptr [10 x i32] addrspace(4)* @array_shared_i32, i32 0, i32 0
store i32 %x, i32 addrspace(4)* %i
ret void
}
-define ptx_device void @t5(i32 %x) {
+define ptx_device void @t4_shared_u64(i64 %x) {
+entry:
+;CHECK: mov.u32 r0, array_shared_i64;
+;CHECK-NEXT: st.shared.u64 [r0], rd1;
+;CHECK-NEXT: ret;
+ %i = getelementptr [10 x i64] addrspace(4)* @array_shared_i64, i32 0, i32 0
+ store i64 %x, i64 addrspace(4)* %i
+ ret void
+}
+
+define ptx_device void @t4_shared_f32(float %x) {
+entry:
+;CHECK: mov.u32 r0, array_shared_float;
+;CHECK-NEXT: st.shared.f32 [r0], f1;
+;CHECK-NEXT: ret;
+ %i = getelementptr [10 x float] addrspace(4)* @array_shared_float, i32 0, i32 0
+ store float %x, float addrspace(4)* %i
+ ret void
+}
+
+define ptx_device void @t4_shared_f64(double %x) {
+entry:
+;CHECK: mov.u32 r0, array_shared_double;
+;CHECK-NEXT: st.shared.f64 [r0], fd1;
+;CHECK-NEXT: ret;
+ %i = getelementptr [10 x double] addrspace(4)* @array_shared_double, i32 0, i32 0
+ store double %x, double addrspace(4)* %i
+ ret void
+}
+
+define ptx_device void @t5_u16(i16 %x) {
entry:
-;CHECK: st.global.s32 [array+4], r1;
- %i = getelementptr [10 x i32]* @array, i32 0, i32 1
+;CHECK: mov.u32 r0, array_i16;
+;CHECK-NEXT: st.global.u16 [r0+2], rh1;
+;CHECK-NEXT: ret;
+ %i = getelementptr [10 x i16]* @array_i16, i32 0, i32 1
+ store i16 %x, i16* %i
+ ret void
+}
+
+define ptx_device void @t5_u32(i32 %x) {
+entry:
+;CHECK: mov.u32 r0, array_i32;
+;CHECK-NEXT: st.global.u32 [r0+4], r1;
+;CHECK-NEXT: ret;
+ %i = getelementptr [10 x i32]* @array_i32, i32 0, i32 1
store i32 %x, i32* %i
ret void
}
+
+define ptx_device void @t5_u64(i64 %x) {
+entry:
+;CHECK: mov.u32 r0, array_i64;
+;CHECK-NEXT: st.global.u64 [r0+8], rd1;
+;CHECK-NEXT: ret;
+ %i = getelementptr [10 x i64]* @array_i64, i32 0, i32 1
+ store i64 %x, i64* %i
+ ret void
+}
+
+define ptx_device void @t5_f32(float %x) {
+entry:
+;CHECK: mov.u32 r0, array_float;
+;CHECK-NEXT: st.global.f32 [r0+4], f1;
+;CHECK-NEXT: ret;
+ %i = getelementptr [10 x float]* @array_float, i32 0, i32 1
+ store float %x, float* %i
+ ret void
+}
+
+define ptx_device void @t5_f64(double %x) {
+entry:
+;CHECK: mov.u32 r0, array_double;
+;CHECK-NEXT: st.global.f64 [r0+8], fd1;
+;CHECK-NEXT: ret;
+ %i = getelementptr [10 x double]* @array_double, i32 0, i32 1
+ store double %x, double* %i
+ ret void
+}
diff --git a/test/CodeGen/PTX/sub.ll b/test/CodeGen/PTX/sub.ll
index aab3fdadad13..7dd2c6f6ac79 100644
--- a/test/CodeGen/PTX/sub.ll
+++ b/test/CodeGen/PTX/sub.ll
@@ -1,15 +1,71 @@
-; RUN: llc < %s -march=ptx | FileCheck %s
+; RUN: llc < %s -march=ptx32 | FileCheck %s
-define ptx_device i32 @t1(i32 %x, i32 %y) {
-;CHECK: sub.s32 r0, r1, r2;
+define ptx_device i16 @t1_u16(i16 %x, i16 %y) {
+; CHECK: sub.u16 rh0, rh1, rh2;
+; CHECK-NEXT: ret;
+ %z = sub i16 %x, %y
+ ret i16 %z
+}
+
+define ptx_device i32 @t1_u32(i32 %x, i32 %y) {
+; CHECK: sub.u32 r0, r1, r2;
+; CHECK-NEXT: ret;
%z = sub i32 %x, %y
-;CHECK: ret;
ret i32 %z
}
-define ptx_device i32 @t2(i32 %x) {
-;CHECK: add.s32 r0, r1, -1;
+define ptx_device i64 @t1_u64(i64 %x, i64 %y) {
+; CHECK: sub.u64 rd0, rd1, rd2;
+; CHECK-NEXT: ret;
+ %z = sub i64 %x, %y
+ ret i64 %z
+}
+
+define ptx_device float @t1_f32(float %x, float %y) {
+; CHECK: sub.f32 f0, f1, f2
+; CHECK-NEXT: ret;
+ %z = fsub float %x, %y
+ ret float %z
+}
+
+define ptx_device double @t1_f64(double %x, double %y) {
+; CHECK: sub.f64 fd0, fd1, fd2
+; CHECK-NEXT: ret;
+ %z = fsub double %x, %y
+ ret double %z
+}
+
+define ptx_device i16 @t2_u16(i16 %x) {
+; CHECK: add.u16 rh0, rh1, -1;
+; CHECK-NEXT: ret;
+ %z = sub i16 %x, 1
+ ret i16 %z
+}
+
+define ptx_device i32 @t2_u32(i32 %x) {
+; CHECK: add.u32 r0, r1, -1;
+; CHECK-NEXT: ret;
%z = sub i32 %x, 1
-;CHECK: ret;
ret i32 %z
}
+
+define ptx_device i64 @t2_u64(i64 %x) {
+; CHECK: add.u64 rd0, rd1, -1;
+; CHECK-NEXT: ret;
+ %z = sub i64 %x, 1
+ ret i64 %z
+}
+
+define ptx_device float @t2_f32(float %x) {
+; CHECK: add.f32 f0, f1, 0FBF800000;
+; CHECK-NEXT: ret;
+ %z = fsub float %x, 1.0
+ ret float %z
+}
+
+define ptx_device double @t2_f64(double %x) {
+; CHECK: add.f64 fd0, fd1, 0DBFF0000000000000;
+; CHECK-NEXT: ret;
+ %z = fsub double %x, 1.0
+ ret double %z
+}
diff --git a/test/CodeGen/PowerPC/2008-12-12-EH.ll b/test/CodeGen/PowerPC/2008-12-12-EH.ll
index 2315e36ff465..a2a5e9e39641 100644
--- a/test/CodeGen/PowerPC/2008-12-12-EH.ll
+++ b/test/CodeGen/PowerPC/2008-12-12-EH.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin9 | grep ^__Z1fv.eh
+; RUN: llc < %s -disable-cfi -march=ppc32 -mtriple=powerpc-apple-darwin9 | grep ^__Z1fv.eh
define void @_Z1fv() {
entry:
diff --git a/test/CodeGen/PowerPC/2010-05-03-retaddr1.ll b/test/CodeGen/PowerPC/2010-05-03-retaddr1.ll
index b10920a6c10d..72ae9d6c73b3 100644
--- a/test/CodeGen/PowerPC/2010-05-03-retaddr1.ll
+++ b/test/CodeGen/PowerPC/2010-05-03-retaddr1.ll
@@ -1,4 +1,5 @@
; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin -mcpu=g5 | FileCheck %s
+; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin -mcpu=g5 -regalloc=basic | FileCheck %s
declare i8* @llvm.frameaddress(i32) nounwind readnone
diff --git a/test/CodeGen/PowerPC/Atomics-64.ll b/test/CodeGen/PowerPC/Atomics-64.ll
index 1dc4310761c3..cfc1eb98e064 100644
--- a/test/CodeGen/PowerPC/Atomics-64.ll
+++ b/test/CodeGen/PowerPC/Atomics-64.ll
@@ -1,5 +1,11 @@
-; RUN: llc < %s -march=ppc64
-; ModuleID = 'Atomics.c'
+; RUN: llc < %s -march=ppc64 -verify-machineinstrs
+;
+; This test is disabled until PPCISelLowering learns to insert proper 64-bit
+; code for ATOMIC_CMP_SWAP. Currently, it is inserting 32-bit instructions with
+; 64-bit operands which causes the machine code verifier to throw a tantrum.
+;
+; XFAIL: *
+
target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f128:64:128"
target triple = "powerpc64-apple-darwin9"
@sc = common global i8 0 ; <i8*> [#uses=52]
diff --git a/test/CodeGen/PowerPC/Frames-small.ll b/test/CodeGen/PowerPC/Frames-small.ll
index 404fdd01966c..ecd5ecd2eca1 100644
--- a/test/CodeGen/PowerPC/Frames-small.ll
+++ b/test/CodeGen/PowerPC/Frames-small.ll
@@ -1,5 +1,5 @@
; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin8 -o %t1
-; RUN not grep {stw r31, -4(r1)} %t1
+; RUN: not grep {stw r31, -4(r1)} %t1
; RUN: grep {stwu r1, -16448(r1)} %t1
; RUN: grep {addi r1, r1, 16448} %t1
; RUN: llc < %s -march=ppc32 | \
diff --git a/test/CodeGen/PowerPC/indirectbr.ll b/test/CodeGen/PowerPC/indirectbr.ll
index 5122ab39d232..ac5662534d0b 100644
--- a/test/CodeGen/PowerPC/indirectbr.ll
+++ b/test/CodeGen/PowerPC/indirectbr.ll
@@ -43,13 +43,13 @@ L2: ; preds = %L3, %bb2
L1: ; preds = %L2, %bb2
%res.3 = phi i32 [ %phitmp, %L2 ], [ 2, %bb2 ] ; <i32> [#uses=1]
-; PIC: addis r4, r4, ha16(Ltmp0-L0$pb)
-; PIC: li r6, lo16(Ltmp0-L0$pb)
-; PIC: add r4, r4, r6
-; PIC: stw r4
-; STATIC: li r5, lo16(Ltmp0)
-; STATIC: addis r5, r5, ha16(Ltmp0)
-; STATIC: stw r5
+; PIC: addis r[[R0:[0-9]+]], r{{[0-9]+}}, ha16(Ltmp0-L0$pb)
+; PIC: li r[[R1:[0-9]+]], lo16(Ltmp0-L0$pb)
+; PIC: add r[[R2:[0-9]+]], r[[R0]], r[[R1]]
+; PIC: stw r[[R2]]
+; STATIC: li r[[R0:[0-9]+]], lo16(Ltmp0)
+; STATIC: addis r[[R0]], r[[R0]], ha16(Ltmp0)
+; STATIC: stw r[[R0]]
store i8* blockaddress(@foo, %L5), i8** @nextaddr, align 4
ret i32 %res.3
}
diff --git a/test/CodeGen/PowerPC/mulhs.ll b/test/CodeGen/PowerPC/mulhs.ll
index 9ab8d997c0d0..5b02e187ae88 100644
--- a/test/CodeGen/PowerPC/mulhs.ll
+++ b/test/CodeGen/PowerPC/mulhs.ll
@@ -5,7 +5,7 @@
; RUN: not grep add %t
; RUN: grep mulhw %t | count 1
-define i32 @mulhs(i32 %a, i32 %b) {
+define i32 @mulhs(i32 %a, i32 %b) nounwind {
entry:
%tmp.1 = sext i32 %a to i64 ; <i64> [#uses=1]
%tmp.3 = sext i32 %b to i64 ; <i64> [#uses=1]
diff --git a/test/CodeGen/PowerPC/ppc-prologue.ll b/test/CodeGen/PowerPC/ppc-prologue.ll
index 2ebfd3c319fc..553837121a36 100644
--- a/test/CodeGen/PowerPC/ppc-prologue.ll
+++ b/test/CodeGen/PowerPC/ppc-prologue.ll
@@ -5,9 +5,7 @@ define i32 @_Z4funci(i32 %a) ssp {
; CHECK-NEXT: stw r31, -4(r1)
; CHECK-NEXT: stw r0, 8(r1)
; CHECK-NEXT: stwu r1, -80(r1)
-; CHECK-NEXT: Ltmp0:
-; CHECK-NEXT: mr r31, r1
-; CHECK-NEXT: Ltmp1:
+; CHECK: mr r31, r1
entry:
%a_addr = alloca i32 ; <i32*> [#uses=2]
%retval = alloca i32 ; <i32*> [#uses=2]
diff --git a/test/CodeGen/SPARC/2011-01-11-FrameAddr.ll b/test/CodeGen/SPARC/2011-01-11-FrameAddr.ll
index fbf724270566..9e6583ca2ce1 100644
--- a/test/CodeGen/SPARC/2011-01-11-FrameAddr.ll
+++ b/test/CodeGen/SPARC/2011-01-11-FrameAddr.ll
@@ -1,5 +1,7 @@
;RUN: llc -march=sparc < %s | FileCheck %s -check-prefix=V8
;RUN: llc -march=sparc -mattr=v9 < %s | FileCheck %s -check-prefix=V9
+;RUN: llc -march=sparc -regalloc=basic < %s | FileCheck %s -check-prefix=V8
+;RUN: llc -march=sparc -regalloc=basic -mattr=v9 < %s | FileCheck %s -check-prefix=V9
define i8* @frameaddr() nounwind readnone {
entry:
diff --git a/test/CodeGen/SystemZ/2009-07-10-BadIncomingArgOffset.ll b/test/CodeGen/SystemZ/2009-07-10-BadIncomingArgOffset.ll
index 98feb83231dc..92f54675b72b 100644
--- a/test/CodeGen/SystemZ/2009-07-10-BadIncomingArgOffset.ll
+++ b/test/CodeGen/SystemZ/2009-07-10-BadIncomingArgOffset.ll
@@ -1,4 +1,5 @@
; RUN: llc < %s | FileCheck %s
+; RUN: llc < %s -regalloc=basic | FileCheck %s
target datalayout = "E-p:64:64:64-i8:8:16-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f128:128:128-a0:16:16"
target triple = "s390x-ibm-linux"
@@ -8,7 +9,7 @@ declare void @rdft(i32 signext, i32 signext, double*, i32* nocapture, double*) n
declare double @mp_mul_d2i_test(i32 signext, i32 signext, double* nocapture) nounwind
define void @mp_mul_radix_test_bb3(i32 %radix, i32 %nfft, double* %tmpfft, i32* %ip, double* %w, double* %arrayidx44.reload, double* %call.out) nounwind {
-; CHECK: lg %r11, 328(%r15)
+; CHECK: lg %r{{[0-9]+}}, 328(%r15)
newFuncRoot:
br label %bb3
diff --git a/test/CodeGen/Thumb/2009-08-20-ISelBug.ll b/test/CodeGen/Thumb/2009-08-20-ISelBug.ll
index 39612c00e4f6..d6ca0d793351 100644
--- a/test/CodeGen/Thumb/2009-08-20-ISelBug.ll
+++ b/test/CodeGen/Thumb/2009-08-20-ISelBug.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -mtriple=thumbv6-apple-darwin -relocation-model=pic -disable-fp-elim -mattr=+v6 | FileCheck %s
+; RUN: llc < %s -mtriple=thumbv6-apple-darwin -relocation-model=pic -disable-fp-elim -mattr=+v6 -verify-machineinstrs | FileCheck %s
; rdar://7157006
%struct.FILE = type { i8*, i32, i32, i16, i16, %struct.__sbuf, i32, i8*, i32 (i8*)*, i32 (i8*, i8*, i32)*, i64 (i8*, i64, i32)*, i32 (i8*, i8*, i32)*, %struct.__sbuf, %struct.__sFILEX*, i32, [3 x i8], [1 x i8], %struct.__sbuf, i32, i64 }
diff --git a/test/CodeGen/Thumb/2010-01-15-local-alloc-spill-physical.ll b/test/CodeGen/Thumb/2010-01-15-local-alloc-spill-physical.ll
deleted file mode 100644
index fad26693e768..000000000000
--- a/test/CodeGen/Thumb/2010-01-15-local-alloc-spill-physical.ll
+++ /dev/null
@@ -1,20 +0,0 @@
-; RUN: llc < %s -regalloc=fast -relocation-model=pic | FileCheck %s
-
-target triple = "thumbv6-apple-darwin10"
-
-@fred = internal global i32 0 ; <i32*> [#uses=1]
-
-define void @foo() nounwind {
-entry:
-; CHECK: str r0, [sp
- %0 = call i32 (...)* @bar() nounwind ; <i32> [#uses=1]
-; CHECK: blx _bar
-; CHECK: ldr r1, [sp
- store i32 %0, i32* @fred, align 4
- br label %return
-
-return: ; preds = %entry
- ret void
-}
-
-declare i32 @bar(...)
diff --git a/test/CodeGen/Thumb/2010-07-15-debugOrdering.ll b/test/CodeGen/Thumb/2010-07-15-debugOrdering.ll
index 06c0dfec5bab..9f5a677ed356 100644
--- a/test/CodeGen/Thumb/2010-07-15-debugOrdering.ll
+++ b/test/CodeGen/Thumb/2010-07-15-debugOrdering.ll
@@ -10,7 +10,7 @@
define void @_Z19getClosestDiagonal3ii(%0* noalias sret, i32, i32) nounwind {
; CHECK: blx ___muldf3
; CHECK: blx ___muldf3
-; CHECK: beq LBB0_7
+; CHECK: beq LBB0
; CHECK: blx ___muldf3
; <label>:3
switch i32 %1, label %4 [
diff --git a/test/CodeGen/Thumb/dyn-stackalloc.ll b/test/CodeGen/Thumb/dyn-stackalloc.ll
index 1f31dca0524d..cd35be69f5ca 100644
--- a/test/CodeGen/Thumb/dyn-stackalloc.ll
+++ b/test/CodeGen/Thumb/dyn-stackalloc.ll
@@ -1,4 +1,5 @@
-; RUN: llc < %s -mtriple=thumb-apple-darwin | FileCheck %s
+; RUN: llc < %s -mtriple=thumb-apple-darwin -disable-cgp-branch-opts -disable-post-ra | FileCheck %s
+; RUN: llc < %s -mtriple=thumb-apple-darwin -disable-cgp-branch-opts -disable-post-ra -regalloc=basic | FileCheck %s
%struct.state = type { i32, %struct.info*, float**, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i64, i64, i64, i64, i64, i8* }
%struct.info = type { i32, i32, i32, i32, i32, i32, i32, i8* }
@@ -7,9 +8,10 @@ define void @t1(%struct.state* %v) {
; CHECK: t1:
; CHECK: push
; CHECK: add r7, sp, #12
-; CHECK: mov r2, sp
-; CHECK: subs r4, r2, r1
-; CHECK: mov sp, r4
+; CHECK: lsls r[[R0:[0-9]+]]
+; CHECK: mov r[[R1:[0-9]+]], sp
+; CHECK: subs r[[R2:[0-9]+]], r[[R1]], r[[R0]]
+; CHECK: mov sp, r[[R2]]
%tmp6 = load i32* null
%tmp8 = alloca float, i32 %tmp6
store i32 1, i32* null
@@ -40,15 +42,16 @@ define void @t2(%struct.comment* %vc, i8* %tag, i8* %contents) {
; CHECK: t2:
; CHECK: push
; CHECK: add r7, sp, #12
-; CHECK: sub sp, #8
-; CHECK: mov r6, sp
-; CHECK: str r2, [r6, #4]
-; CHECK: str r0, [r6]
+; CHECK: sub sp, #
+; CHECK: mov r[[R0:[0-9]+]], sp
+; CHECK: str r{{[0-9+]}}, [r[[R0]]
+; CHECK: str r{{[0-9+]}}, [r[[R0]]
; CHECK-NOT: ldr r0, [sp
-; CHECK: ldr r0, [r6, #4]
-; CHECK: mov r0, sp
-; CHECK: subs r5, r0, r1
-; CHECK: mov sp, r5
+; CHECK: mov r[[R1:[0-9]+]], sp
+; CHECK: subs r[[R2:[0-9]+]], r[[R1]], r{{[0-9]+}}
+; CHECK: mov sp, r[[R2]]
+; CHECK-NOT: ldr r0, [sp
+; CHECK: bx
%tmp1 = call i32 @strlen( i8* %tag )
%tmp3 = call i32 @strlen( i8* %contents )
%tmp4 = add i32 %tmp1, 2
diff --git a/test/CodeGen/Thumb/rev.ll b/test/CodeGen/Thumb/rev.ll
new file mode 100644
index 000000000000..5e163f8f96bc
--- /dev/null
+++ b/test/CodeGen/Thumb/rev.ll
@@ -0,0 +1,56 @@
+; RUN: llc < %s -march=thumb -mattr=+v6 | FileCheck %s
+
+define i32 @test1(i32 %X) nounwind {
+; CHECK: test1
+; CHECK: rev16 r0, r0
+ %tmp1 = lshr i32 %X, 8
+ %X15 = bitcast i32 %X to i32
+ %tmp4 = shl i32 %X15, 8
+ %tmp2 = and i32 %tmp1, 16711680
+ %tmp5 = and i32 %tmp4, -16777216
+ %tmp9 = and i32 %tmp1, 255
+ %tmp13 = and i32 %tmp4, 65280
+ %tmp6 = or i32 %tmp5, %tmp2
+ %tmp10 = or i32 %tmp6, %tmp13
+ %tmp14 = or i32 %tmp10, %tmp9
+ ret i32 %tmp14
+}
+
+define i32 @test2(i32 %X) nounwind {
+; CHECK: test2
+; CHECK: revsh r0, r0
+ %tmp1 = lshr i32 %X, 8
+ %tmp1.upgrd.1 = trunc i32 %tmp1 to i16
+ %tmp3 = trunc i32 %X to i16
+ %tmp2 = and i16 %tmp1.upgrd.1, 255
+ %tmp4 = shl i16 %tmp3, 8
+ %tmp5 = or i16 %tmp2, %tmp4
+ %tmp5.upgrd.2 = sext i16 %tmp5 to i32
+ ret i32 %tmp5.upgrd.2
+}
+
+; rdar://9147637
+define i32 @test3(i16 zeroext %a) nounwind {
+entry:
+; CHECK: test3:
+; CHECK: revsh r0, r0
+ %0 = tail call i16 @llvm.bswap.i16(i16 %a)
+ %1 = sext i16 %0 to i32
+ ret i32 %1
+}
+
+declare i16 @llvm.bswap.i16(i16) nounwind readnone
+
+define i32 @test4(i16 zeroext %a) nounwind {
+entry:
+; CHECK: test4:
+; CHECK: revsh r0, r0
+ %conv = zext i16 %a to i32
+ %shr9 = lshr i16 %a, 8
+ %conv2 = zext i16 %shr9 to i32
+ %shl = shl nuw nsw i32 %conv, 8
+ %or = or i32 %conv2, %shl
+ %sext = shl i32 %or, 16
+ %conv8 = ashr exact i32 %sext, 16
+ ret i32 %conv8
+}
diff --git a/test/CodeGen/Thumb2/2009-08-06-SpDecBug.ll b/test/CodeGen/Thumb2/2009-08-06-SpDecBug.ll
index 550b3efae998..ff68e665078a 100644
--- a/test/CodeGen/Thumb2/2009-08-06-SpDecBug.ll
+++ b/test/CodeGen/Thumb2/2009-08-06-SpDecBug.ll
@@ -8,7 +8,7 @@ entry:
; CHECK: sub sp, #8
; CHECK: push
; CHECK: add r7, sp, #4
-; CHECK: subs r4, r7, #4
+; CHECK: sub.w r4, r7, #4
; CHECK: mov sp, r4
; CHECK-NOT: mov sp, r7
; CHECK: add sp, #8
diff --git a/test/CodeGen/Thumb2/2009-09-28-ITBlockBug.ll b/test/CodeGen/Thumb2/2009-09-28-ITBlockBug.ll
index b2ed8fc7a67c..ac3e80a7c113 100644
--- a/test/CodeGen/Thumb2/2009-09-28-ITBlockBug.ll
+++ b/test/CodeGen/Thumb2/2009-09-28-ITBlockBug.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -mtriple=thumbv7-apple-darwin -mcpu=cortex-a8 | FileCheck %s
+; RUN: llc < %s -mtriple=thumbv7-apple-darwin -mcpu=cortex-a8 -disable-cgp-branch-opts | FileCheck %s
%struct.pix_pos = type { i32, i32, i32, i32, i32, i32 }
diff --git a/test/CodeGen/Thumb2/2009-10-15-ITBlockBranch.ll b/test/CodeGen/Thumb2/2009-10-15-ITBlockBranch.ll
index 45d356c3dc67..3594424e290b 100644
--- a/test/CodeGen/Thumb2/2009-10-15-ITBlockBranch.ll
+++ b/test/CodeGen/Thumb2/2009-10-15-ITBlockBranch.ll
@@ -1,4 +1,5 @@
; RUN: llc < %s -mtriple=thumbv7-eabi -mcpu=cortex-a8 -float-abi=hard | FileCheck %s
+; RUN: llc < %s -mtriple=thumbv7-eabi -mcpu=cortex-a8 -float-abi=hard -regalloc=basic | FileCheck %s
; PR5204
%"struct.__gnu_cxx::__normal_iterator<char*,std::basic_string<char, std::char_traits<char>, std::allocator<char> > >" = type { i8* }
@@ -11,8 +12,8 @@
define weak arm_aapcs_vfpcc i32 @_ZNKSs7compareERKSs(%"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >"* %this, %"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >"* %__str) {
; CHECK: _ZNKSs7compareERKSs:
; CHECK: it eq
-; CHECK-NEXT: subeq r0, r6, r7
-; CHECK-NEXT: ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
+; CHECK-NEXT: subeq r0, r{{[0-9]+}}, r{{[0-9]+}}
+; CHECK-NEXT: ldmia.w sp!,
entry:
%0 = tail call arm_aapcs_vfpcc i32 @_ZNKSs4sizeEv(%"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >"* %this) ; <i32> [#uses=3]
%1 = tail call arm_aapcs_vfpcc i32 @_ZNKSs4sizeEv(%"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >"* %__str) ; <i32> [#uses=3]
diff --git a/test/CodeGen/Thumb2/2010-03-15-AsmCCClobber.ll b/test/CodeGen/Thumb2/2010-03-15-AsmCCClobber.ll
index 458569ec93b5..bb734aca4e68 100644
--- a/test/CodeGen/Thumb2/2010-03-15-AsmCCClobber.ll
+++ b/test/CodeGen/Thumb2/2010-03-15-AsmCCClobber.ll
@@ -1,10 +1,11 @@
; RUN: llc < %s -mtriple=thumbv7-apple-darwin -mcpu=cortex-a8 \
-; RUN: -pre-RA-sched=source | FileCheck -check-prefix=SOURCE %s
+; RUN: -pre-RA-sched=source | FileCheck %s
; RUN: llc < %s -mtriple=thumbv7-apple-darwin -mcpu=cortex-a8 \
-; RUN: -pre-RA-sched=list-hybrid | FileCheck -check-prefix=HYBRID %s
+; RUN: -pre-RA-sched=list-hybrid | FileCheck %s
+; RUN: llc < %s -mtriple=thumbv7-apple-darwin -mcpu=cortex-a8 -regalloc=basic | FileCheck %s
; Radar 7459078
target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:64:64-v128:128:128-a0:0:32-n32"
-
+
%0 = type { i32, i32 }
%s1 = type { %s3, i32, %s4, i8*, void (i8*, i8*)*, i8*, i32*, i32*, i32*, i32, i64, [1 x i32] }
%s2 = type { i32 (...)**, %s4 }
@@ -13,11 +14,10 @@ target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-
%s5 = type { i32 }
; Make sure the cmp is not scheduled before the InlineAsm that clobbers cc.
-; SOURCE: InlineAsm End
-; SOURCE: cmp
-; SOURCE: beq
-; HYBRID: InlineAsm End
-; HYBRID: cbz
+; CHECK: blx _f2
+; CHECK: cmp r0, #0
+; CHECK-NOT: cmp
+; CHECK: InlineAsm Start
define void @test(%s1* %this, i32 %format, i32 %w, i32 %h, i32 %levels, i32* %s, i8* %data, i32* nocapture %rowbytes, void (i8*, i8*)* %release, i8* %info) nounwind {
entry:
%tmp1 = getelementptr inbounds %s1* %this, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0
diff --git a/test/CodeGen/Thumb2/2010-11-22-EpilogueBug.ll b/test/CodeGen/Thumb2/2010-11-22-EpilogueBug.ll
index 313728c1b56a..d2140a10048d 100644
--- a/test/CodeGen/Thumb2/2010-11-22-EpilogueBug.ll
+++ b/test/CodeGen/Thumb2/2010-11-22-EpilogueBug.ll
@@ -8,7 +8,7 @@ declare void @bar() nounwind optsize
define void @foo() nounwind optsize {
; CHECK: foo:
; CHECK: push
-; CHECK: add r7, sp, #4
+; CHECK: mov r7, sp
; CHECK: sub sp, #4
entry:
%m.i = alloca %struct.buf*, align 4
diff --git a/test/CodeGen/Thumb2/2011-04-21-FILoweringBug.ll b/test/CodeGen/Thumb2/2011-04-21-FILoweringBug.ll
new file mode 100644
index 000000000000..604a352baa11
--- /dev/null
+++ b/test/CodeGen/Thumb2/2011-04-21-FILoweringBug.ll
@@ -0,0 +1,23 @@
+; RUN: llc < %s -mtriple=thumbv7-apple-darwin | FileCheck %s
+
+; Use sp, #imm to lower frame indices when the offset is multiple of 4
+; and in the range of 0-1020. This saves code size by utilizing
+; 16-bit instructions.
+; rdar://9321541
+
+define i32 @t() nounwind {
+entry:
+; CHECK: t:
+; CHECK: sub sp, #12
+; CHECK-NOT: sub
+; CHECK: add r0, sp, #4
+; CHECK: add r1, sp, #8
+; CHECK: mov r2, sp
+ %size = alloca i32, align 4
+ %count = alloca i32, align 4
+ %index = alloca i32, align 4
+ %0 = call i32 @foo(i32* %count, i32* %size, i32* %index) nounwind
+ ret i32 %0
+}
+
+declare i32 @foo(i32*, i32*, i32*)
diff --git a/test/CodeGen/Thumb2/bfi.ll b/test/CodeGen/Thumb2/bfi.ll
index 6fb2fc888d9f..0e767707b6cf 100644
--- a/test/CodeGen/Thumb2/bfi.ll
+++ b/test/CodeGen/Thumb2/bfi.ll
@@ -49,3 +49,14 @@ define i32 @f4(i32 %a) nounwind {
%ins12 = or i32 %ins7, 3137
ret i32 %ins12
}
+
+; rdar://9177502
+define i32 @f5(i32 %a, i32 %b) nounwind readnone {
+entry:
+; CHECK: f5
+; CHECK-NOT: bfi r0, r2, #0, #1
+%and = and i32 %a, 2
+%b.masked = and i32 %b, -2
+%and3 = or i32 %b.masked, %and
+ret i32 %and3
+}
diff --git a/test/CodeGen/Thumb2/cross-rc-coalescing-2.ll b/test/CodeGen/Thumb2/cross-rc-coalescing-2.ll
index b8c8cb122a19..edbf83405be7 100644
--- a/test/CodeGen/Thumb2/cross-rc-coalescing-2.ll
+++ b/test/CodeGen/Thumb2/cross-rc-coalescing-2.ll
@@ -6,8 +6,6 @@ entry:
br label %bb5
bb5: ; preds = %bb5, %entry
-; CHECK: %bb5
-; CHECK: bne
br i1 undef, label %bb5, label %bb.nph
bb.nph: ; preds = %bb5
diff --git a/test/CodeGen/Thumb2/ldr-str-imm12.ll b/test/CodeGen/Thumb2/ldr-str-imm12.ll
index 650d788cb4d2..e1932bd2748a 100644
--- a/test/CodeGen/Thumb2/ldr-str-imm12.ll
+++ b/test/CodeGen/Thumb2/ldr-str-imm12.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -mtriple=thumbv7-apple-darwin -mcpu=cortex-a8 -relocation-model=pic -disable-fp-elim | FileCheck %s
+; RUN: llc < %s -mtriple=thumbv7-apple-darwin -mcpu=cortex-a8 -relocation-model=pic -disable-fp-elim -regalloc=linearscan | FileCheck %s
; rdar://7352504
; Make sure we use "str r9, [sp, #+28]" instead of "sub.w r4, r7, #256" followed by "str r9, [r4, #-32]".
@@ -22,7 +22,7 @@
define %union.rec* @Manifest(%union.rec* %x, %union.rec* %env, %struct.STYLE* %style, %union.rec** %bthr, %union.rec** %fthr, %union.rec** %target, %union.rec** %crs, i32 %ok, i32 %need_expand, %union.rec** %enclose, i32 %fcr) nounwind {
entry:
-; CHECK: ldr.w {{(r[0-9])|(lr)}}, [r7, #28]
+; CHECK: ldr.w {{(r[0-9]+)|(lr)}}, [r7, #28]
%xgaps.i = alloca [32 x %union.rec*], align 4 ; <[32 x %union.rec*]*> [#uses=0]
%ycomp.i = alloca [32 x %union.rec*], align 4 ; <[32 x %union.rec*]*> [#uses=0]
br label %bb20
diff --git a/test/CodeGen/Thumb2/machine-licm.ll b/test/CodeGen/Thumb2/machine-licm.ll
index 5e776dd8937c..ee054a165a01 100644
--- a/test/CodeGen/Thumb2/machine-licm.ll
+++ b/test/CodeGen/Thumb2/machine-licm.ll
@@ -14,19 +14,19 @@ entry:
bb.nph: ; preds = %entry
; CHECK: BB#1
-; CHECK: movw r2, :lower16:L_GV$non_lazy_ptr
-; CHECK: movt r2, :upper16:L_GV$non_lazy_ptr
-; CHECK: ldr r2, [r2]
-; CHECK: ldr r3, [r2]
+; CHECK: movw r[[R2:[0-9]+]], :lower16:L_GV$non_lazy_ptr
+; CHECK: movt r[[R2]], :upper16:L_GV$non_lazy_ptr
+; CHECK: ldr{{(.w)?}} r[[R2b:[0-9]+]], [r[[R2]]
+; CHECK: ldr{{.*}}, [r[[R2b]]
; CHECK: LBB0_2
; CHECK-NOT: LCPI0_0:
; PIC: BB#1
-; PIC: movw r2, :lower16:(L_GV$non_lazy_ptr-(LPC0_0+4))
-; PIC: movt r2, :upper16:(L_GV$non_lazy_ptr-(LPC0_0+4))
-; PIC: add r2, pc
-; PIC: ldr r2, [r2]
-; PIC: ldr r3, [r2]
+; PIC: movw r[[R2:[0-9]+]], :lower16:(L_GV$non_lazy_ptr-(LPC0_0+4))
+; PIC: movt r[[R2]], :upper16:(L_GV$non_lazy_ptr-(LPC0_0+4))
+; PIC: add r[[R2]], pc
+; PIC: ldr{{(.w)?}} r[[R2b:[0-9]+]], [r[[R2]]
+; PIC: ldr{{.*}}, [r[[R2b]]
; PIC: LBB0_2
; PIC-NOT: LCPI0_0:
; PIC: .section
@@ -88,10 +88,10 @@ define zeroext i16 @t3(i8 zeroext %data, i16 zeroext %crc) nounwind readnone {
bb.nph:
; CHECK: bb.nph
; CHECK: movw {{(r[0-9])|(lr)}}, #32768
-; CHECK: movs {{(r[0-9])|(lr)}}, #8
-; CHECK: movw [[REGISTER:(r[0-9])|(lr)]], #16386
-; CHECK: movw {{(r[0-9])|(lr)}}, #65534
-; CHECK: movt {{(r[0-9])|(lr)}}, #65535
+; CHECK: movs {{(r[0-9]+)|(lr)}}, #0
+; CHECK: movw [[REGISTER:(r[0-9]+)|(lr)]], #16386
+; CHECK: movw {{(r[0-9]+)|(lr)}}, #65534
+; CHECK: movt {{(r[0-9]+)|(lr)}}, #65535
br label %bb
bb: ; preds = %bb, %bb.nph
diff --git a/test/CodeGen/Thumb2/thumb2-ldrd.ll b/test/CodeGen/Thumb2/thumb2-ldrd.ll
index a747d5f75697..d3b781dbc0d4 100644
--- a/test/CodeGen/Thumb2/thumb2-ldrd.ll
+++ b/test/CodeGen/Thumb2/thumb2-ldrd.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -mtriple=thumbv7-apple-darwin -mattr=+thumb2 | FileCheck %s
+; RUN: llc < %s -mtriple=thumbv7-apple-darwin -mattr=+thumb2 -regalloc=linearscan | FileCheck %s
@b = external global i64*
diff --git a/test/CodeGen/Thumb2/thumb2-lsr3.ll b/test/CodeGen/Thumb2/thumb2-lsr3.ll
index 5cfd3f5198b7..e7ba782afe6a 100644
--- a/test/CodeGen/Thumb2/thumb2-lsr3.ll
+++ b/test/CodeGen/Thumb2/thumb2-lsr3.ll
@@ -1,9 +1,9 @@
-; RUN: llc < %s -march=thumb -mattr=+thumb2
+; RUN: llc < %s -march=thumb -mattr=+thumb2 | FileCheck %s
define i1 @test1(i64 %poscnt, i32 %work) {
entry:
-; CHECK: rrx r0, r0
; CHECK: lsrs.w r1, r1, #1
+; CHECK: rrx r0, r0
%0 = lshr i64 %poscnt, 1
%1 = icmp eq i64 %0, 0
ret i1 %1
@@ -11,8 +11,8 @@ entry:
define i1 @test2(i64 %poscnt, i32 %work) {
entry:
-; CHECK: rrx r0, r0
; CHECK: asrs.w r1, r1, #1
+; CHECK: rrx r0, r0
%0 = ashr i64 %poscnt, 1
%1 = icmp eq i64 %0, 0
ret i1 %1
diff --git a/test/CodeGen/Thumb2/thumb2-ror.ll b/test/CodeGen/Thumb2/thumb2-ror.ll
index 0200116fc31a..590c333b3d1a 100644
--- a/test/CodeGen/Thumb2/thumb2-ror.ll
+++ b/test/CodeGen/Thumb2/thumb2-ror.ll
@@ -1,11 +1,24 @@
; RUN: llc < %s -march=thumb -mattr=+thumb2 | FileCheck %s
+; CHECK: f1:
+; CHECK: ror.w r0, r0, #22
define i32 @f1(i32 %a) {
%l8 = shl i32 %a, 10
%r8 = lshr i32 %a, 22
%tmp = or i32 %l8, %r8
ret i32 %tmp
}
-; CHECK: f1:
-; CHECK: ror.w r0, r0, #22
+
+; CHECK: f2:
+; CHECK-NOT: and
+; CHECK: ror
+define i32 @f2(i32 %v, i32 %nbits) {
+entry:
+ %and = and i32 %nbits, 31
+ %shr = lshr i32 %v, %and
+ %sub = sub i32 32, %and
+ %shl = shl i32 %v, %sub
+ %or = or i32 %shl, %shr
+ ret i32 %or
+} \ No newline at end of file
diff --git a/test/CodeGen/Thumb2/thumb2-ror2.ll b/test/CodeGen/Thumb2/thumb2-ror2.ll
deleted file mode 100644
index ffd1dd7dc613..000000000000
--- a/test/CodeGen/Thumb2/thumb2-ror2.ll
+++ /dev/null
@@ -1,11 +0,0 @@
-; RUN: llc < %s -march=thumb -mattr=+thumb2 | FileCheck %s
-
-define i32 @f1(i32 %a, i32 %b) {
-; CHECK: f1:
-; CHECK: rors r0, r1
- %db = sub i32 32, %b
- %l8 = shl i32 %a, %b
- %r8 = lshr i32 %a, %db
- %tmp = or i32 %l8, %r8
- ret i32 %tmp
-}
diff --git a/test/CodeGen/Thumb2/thumb2-sbc.ll b/test/CodeGen/Thumb2/thumb2-sbc.ll
index de6502d2e63e..53f45ea951f5 100644
--- a/test/CodeGen/Thumb2/thumb2-sbc.ll
+++ b/test/CodeGen/Thumb2/thumb2-sbc.ll
@@ -39,7 +39,7 @@ define i64 @f5(i64 %a) {
; CHECK: f5
; CHECK: subs r0, #2
; CHECK: adc r1, r1, #-1448498775
- %tmp = sub i64 %a, 6221254862626095106
+ %tmp = sub i64 %a, 6221254862626095106
ret i64 %tmp
}
@@ -48,7 +48,22 @@ define i64 @f6(i64 %a) {
; CHECK: f6
; CHECK: subs r0, #2
; CHECK: sbc r1, r1, #66846720
- %tmp = sub i64 %a, 287104476244869122
+ %tmp = sub i64 %a, 287104476244869122
ret i64 %tmp
}
+; Example from numerics code that manually computes wider-than-64 values.
+;
+; CHECK: livecarry:
+; CHECK: adds
+; CHECK: adcs
+; CHECK: adc
+define i64 @livecarry(i64 %carry, i32 %digit) nounwind {
+ %ch = lshr i64 %carry, 32
+ %cl = and i64 %carry, 4294967295
+ %truncdigit = zext i32 %digit to i64
+ %prod = add i64 %cl, %truncdigit
+ %ph = lshr i64 %prod, 32
+ %carryresult = add i64 %ch, %ph
+ ret i64 %carryresult
+}
diff --git a/test/CodeGen/Thumb2/thumb2-sub3.ll b/test/CodeGen/Thumb2/thumb2-sub3.ll
index 855ad06a63f1..1dbda57f2369 100644
--- a/test/CodeGen/Thumb2/thumb2-sub3.ll
+++ b/test/CodeGen/Thumb2/thumb2-sub3.ll
@@ -4,7 +4,7 @@
define i64 @f1(i64 %a) {
; CHECK: f1
; CHECK: subs r0, #171
-; CHECK: adc r1, r1, #-1
+; CHECK: sbc r1, r1, #0
%tmp = sub i64 %a, 171
ret i64 %tmp
}
@@ -13,7 +13,7 @@ define i64 @f1(i64 %a) {
define i64 @f2(i64 %a) {
; CHECK: f2
; CHECK: subs.w r0, r0, #1179666
-; CHECK: adc r1, r1, #-1
+; CHECK: sbc r1, r1, #0
%tmp = sub i64 %a, 1179666
ret i64 %tmp
}
@@ -22,7 +22,7 @@ define i64 @f2(i64 %a) {
define i64 @f3(i64 %a) {
; CHECK: f3
; CHECK: subs.w r0, r0, #872428544
-; CHECK: adc r1, r1, #-1
+; CHECK: sbc r1, r1, #0
%tmp = sub i64 %a, 872428544
ret i64 %tmp
}
@@ -31,7 +31,7 @@ define i64 @f3(i64 %a) {
define i64 @f4(i64 %a) {
; CHECK: f4
; CHECK: subs.w r0, r0, #1448498774
-; CHECK: adc r1, r1, #-1
+; CHECK: sbc r1, r1, #0
%tmp = sub i64 %a, 1448498774
ret i64 %tmp
}
@@ -40,7 +40,7 @@ define i64 @f4(i64 %a) {
define i64 @f5(i64 %a) {
; CHECK: f5
; CHECK: subs.w r0, r0, #66846720
-; CHECK: adc r1, r1, #-1
+; CHECK: sbc r1, r1, #0
%tmp = sub i64 %a, 66846720
ret i64 %tmp
}
diff --git a/test/CodeGen/Thumb2/thumb2-sub5.ll b/test/CodeGen/Thumb2/thumb2-sub5.ll
index c3b56bc09c85..6edd789beec5 100644
--- a/test/CodeGen/Thumb2/thumb2-sub5.ll
+++ b/test/CodeGen/Thumb2/thumb2-sub5.ll
@@ -1,9 +1,10 @@
-; RUN: llc < %s -march=thumb -mattr=+thumb2 | FileCheck %s
+; RUN: llc < %s -march=thumb -mattr=+thumb2 -mattr=+32bit | FileCheck %s
define i64 @f1(i64 %a, i64 %b) {
; CHECK: f1:
-; CHECK: subs r0, r0, r2
-; CHECK: sbcs r1, r3
+; CHECK: subs.w r0, r0, r2
+; To test dead_carry, +32bit prevents sbc conveting to 16-bit sbcs
+; CHECK: sbc.w r1, r1, r3
%tmp = sub i64 %a, %b
ret i64 %tmp
}
diff --git a/test/CodeGen/Thumb2/thumb2-uxtb.ll b/test/CodeGen/Thumb2/thumb2-uxtb.ll
index 2074f98cb608..35914b16790a 100644
--- a/test/CodeGen/Thumb2/thumb2-uxtb.ll
+++ b/test/CodeGen/Thumb2/thumb2-uxtb.ll
@@ -128,9 +128,9 @@ define i32 @test10(i32 %p0) {
; ARMv7M: test10
; ARMv7M: mov.w r1, #16253176
+; ARMv7M: mov.w r2, #458759
; ARMv7M: and.w r0, r1, r0, lsr #7
-; ARMv7M: mov.w r1, #458759
-; ARMv7M: and.w r1, r1, r0, lsr #5
+; ARMv7M: and.w r1, r2, r0, lsr #5
; ARMv7M: orrs r0, r1
%tmp1 = lshr i32 %p0, 7 ; <i32> [#uses=1]
%tmp2 = and i32 %tmp1, 16253176 ; <i32> [#uses=2]
diff --git a/test/CodeGen/X86/2007-01-08-X86-64-Pointer.ll b/test/CodeGen/X86/2007-01-08-X86-64-Pointer.ll
index de226a140ad1..3458550aa103 100644
--- a/test/CodeGen/X86/2007-01-08-X86-64-Pointer.ll
+++ b/test/CodeGen/X86/2007-01-08-X86-64-Pointer.ll
@@ -1,5 +1,8 @@
-; RUN: llc %s -o - -march=x86-64 | grep {(%rdi,%rax,8)}
-; RUN: llc %s -o - -march=x86-64 | not grep {addq.*8}
+; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s
+; RUN: llc < %s -mtriple=x86_64-win32 | FileCheck %s
+; CHECK-NOT: {{addq.*8}}
+; CHECK: ({{%rdi|%rcx}},%rax,8)
+; CHECK-NOT: {{addq.*8}}
define void @foo(double* %y) nounwind {
entry:
diff --git a/test/CodeGen/X86/2007-04-25-MMX-PADDQ.ll b/test/CodeGen/X86/2007-04-25-MMX-PADDQ.ll
index a662dd58df57..11c0bf957983 100644
--- a/test/CodeGen/X86/2007-04-25-MMX-PADDQ.ll
+++ b/test/CodeGen/X86/2007-04-25-MMX-PADDQ.ll
@@ -8,8 +8,8 @@ entry:
bb26: ; preds = %bb26, %entry
-; CHECK: addl %e
-; CHECK: adcl %e
+; CHECK: addl
+; CHECK: adcl
%i.037.0 = phi i32 [ 0, %entry ], [ %tmp25, %bb26 ] ; <i32> [#uses=3]
%sum.035.0 = phi <1 x i64> [ zeroinitializer, %entry ], [ %tmp22, %bb26 ] ; <<1 x i64>> [#uses=1]
diff --git a/test/CodeGen/X86/2007-05-05-Personality.ll b/test/CodeGen/X86/2007-05-05-Personality.ll
index a9b17d3b8f36..0f49d2e10cb9 100644
--- a/test/CodeGen/X86/2007-05-05-Personality.ll
+++ b/test/CodeGen/X86/2007-05-05-Personality.ll
@@ -1,4 +1,7 @@
-; RUN: llc < %s -mtriple=i686-pc-linux-gnu -o - | grep zPL
+; RUN: llc < %s -mtriple=i686-pc-linux-gnu -o - | FileCheck %s
+
+; CHECK: .cfi_personality 0, __gnat_eh_personality
+; CHECK: .cfi_lsda 0, .Lexception0
@error = external global i8 ; <i8*> [#uses=2]
diff --git a/test/CodeGen/X86/2007-07-03-GR64ToVR64.ll b/test/CodeGen/X86/2007-07-03-GR64ToVR64.ll
index 1c5e6766fd6e..187c3e4221b5 100644
--- a/test/CodeGen/X86/2007-07-03-GR64ToVR64.ll
+++ b/test/CodeGen/X86/2007-07-03-GR64ToVR64.ll
@@ -1,6 +1,8 @@
-; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=+mmx | grep {movd %rsi, %mm0}
-; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=+mmx | grep {movd %rdi, %mm1}
-; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=+mmx | grep {paddusw %mm0, %mm1}
+; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=+mmx | FileCheck %s
+
+; CHECK: movd %rsi, [[MM0:%mm[0-9]+]]
+; CHECK: movd %rdi, [[MM1:%mm[0-9]+]]
+; CHECK: paddusw [[MM0]], [[MM1]]
@R = external global x86_mmx ; <x86_mmx*> [#uses=1]
diff --git a/test/CodeGen/X86/2007-07-18-Vector-Extract.ll b/test/CodeGen/X86/2007-07-18-Vector-Extract.ll
index 8625b2771738..6288c4a892c3 100644
--- a/test/CodeGen/X86/2007-07-18-Vector-Extract.ll
+++ b/test/CodeGen/X86/2007-07-18-Vector-Extract.ll
@@ -1,5 +1,7 @@
-; RUN: llc < %s -march=x86-64 -mattr=+sse | grep {movq (%rdi), %rax}
-; RUN: llc < %s -march=x86-64 -mattr=+sse | grep {movq 8(%rdi), %rax}
+; RUN: llc < %s -mtriple=x86_64-linux -mattr=+sse | FileCheck %s
+; RUN: llc < %s -mtriple=x86_64-win32 -mattr=+sse | FileCheck %s
+; CHECK: movq ([[A0:%rdi|%rcx]]), %rax
+; CHECK: movq 8([[A0]]), %rax
define i64 @foo_0(<2 x i64>* %val) {
entry:
%val12 = getelementptr <2 x i64>* %val, i32 0, i32 0 ; <i64*> [#uses=1]
diff --git a/test/CodeGen/X86/2007-09-17-ObjcFrameEH.ll b/test/CodeGen/X86/2007-09-17-ObjcFrameEH.ll
index c3403a0b4eeb..1e43272a84e8 100644
--- a/test/CodeGen/X86/2007-09-17-ObjcFrameEH.ll
+++ b/test/CodeGen/X86/2007-09-17-ObjcFrameEH.ll
@@ -1,4 +1,6 @@
-; RUN: llc < %s -march=x86 -mtriple=i686-apple-darwin | grep {isNullOrNil].eh"} | count 2
+; RUN: llc < %s -disable-cfi -march=x86 -mtriple=i686-apple-darwin | grep {isNullOrNil].eh"} | FileCheck %s
+
+; CHECK: "_-[NSString(local) isNullOrNil].eh":
%struct.NSString = type { }
%struct._objc__method_prototype_list = type opaque
diff --git a/test/CodeGen/X86/2007-09-27-LDIntrinsics.ll b/test/CodeGen/X86/2007-09-27-LDIntrinsics.ll
index 4d6971586c2a..b4a986ff77f9 100644
--- a/test/CodeGen/X86/2007-09-27-LDIntrinsics.ll
+++ b/test/CodeGen/X86/2007-09-27-LDIntrinsics.ll
@@ -22,8 +22,8 @@ entry:
; CHECK: bar:
; CHECK: fldt 4(%esp)
; CHECK-NEXT: fld %st(0)
-; CHECK-NEXT: fmul %st(1)
-; CHECK-NEXT: fmulp %st(1)
+; CHECK-NEXT: fmul %st(1), %st(0)
+; CHECK-NEXT: fmulp
; CHECK-NEXT: ret
}
diff --git a/test/CodeGen/X86/2008-02-22-ReMatBug.ll b/test/CodeGen/X86/2008-02-22-ReMatBug.ll
index a91ac27f98dd..8f4d353f28d3 100644
--- a/test/CodeGen/X86/2008-02-22-ReMatBug.ll
+++ b/test/CodeGen/X86/2008-02-22-ReMatBug.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -march=x86 -stats |& grep {Number of re-materialization} | grep 2
+; RUN: llc < %s -march=x86 -stats -regalloc=linearscan |& grep {Number of re-materialization} | grep 2
; rdar://5761454
%struct.quad_struct = type { i32, i32, %struct.quad_struct*, %struct.quad_struct*, %struct.quad_struct*, %struct.quad_struct*, %struct.quad_struct* }
diff --git a/test/CodeGen/X86/2008-03-18-CoalescerBug.ll b/test/CodeGen/X86/2008-03-18-CoalescerBug.ll
index 3ae502619725..33d658ca01f9 100644
--- a/test/CodeGen/X86/2008-03-18-CoalescerBug.ll
+++ b/test/CodeGen/X86/2008-03-18-CoalescerBug.ll
@@ -1,5 +1,5 @@
-; RUN: llc < %s -mtriple=i386-apple-darwin -mattr=+sse2 -disable-fp-elim | grep movss | count 1
-; RUN: llc < %s -mtriple=i386-apple-darwin -mattr=+sse2 -disable-fp-elim -stats |& grep {Number of re-materialization} | grep 1
+; RUN: llc < %s -mtriple=i386-apple-darwin -mattr=+sse2 -disable-fp-elim -regalloc=linearscan | grep movss | count 1
+; RUN: llc < %s -mtriple=i386-apple-darwin -mattr=+sse2 -disable-fp-elim -regalloc=linearscan -stats |& grep {Number of re-materialization} | grep 1
%struct..0objc_object = type opaque
%struct.OhBoy = type { }
diff --git a/test/CodeGen/X86/2008-04-02-unnamedEH.ll b/test/CodeGen/X86/2008-04-02-unnamedEH.ll
index 27bbbaa2962d..ab8ec801b049 100644
--- a/test/CodeGen/X86/2008-04-02-unnamedEH.ll
+++ b/test/CodeGen/X86/2008-04-02-unnamedEH.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s | FileCheck %s
+; RUN: llc < %s -disable-cfi | FileCheck %s
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
target triple = "i386-apple-darwin8"
diff --git a/test/CodeGen/X86/2008-04-16-ReMatBug.ll b/test/CodeGen/X86/2008-04-16-ReMatBug.ll
index 6e8891bfd5b8..bfe8ef53f565 100644
--- a/test/CodeGen/X86/2008-04-16-ReMatBug.ll
+++ b/test/CodeGen/X86/2008-04-16-ReMatBug.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -mtriple=i386-apple-darwin | grep movw | not grep {, %e}
+; RUN: llc < %s -mtriple=i386-apple-darwin -disable-cgp-branch-opts | grep movw | not grep {, %e}
%struct.DBC_t = type { i32, i8*, i16, %struct.DBC_t*, i8*, i8*, i8*, i8*, i8*, %struct.DBC_t*, i32, i32, i32, i32, i8*, i8*, i8*, i8*, i8*, i32, i32, i32, i32, i32, i32, i32, i32, i16, i16, i32*, i8, i16, %struct.DRVOPT*, i16 }
%struct.DRVOPT = type { i16, i32, i8, %struct.DRVOPT* }
diff --git a/test/CodeGen/X86/2008-07-11-SpillerBug.ll b/test/CodeGen/X86/2008-07-11-SpillerBug.ll
index d0023b28c6dd..dee7415b0836 100644
--- a/test/CodeGen/X86/2008-07-11-SpillerBug.ll
+++ b/test/CodeGen/X86/2008-07-11-SpillerBug.ll
@@ -4,7 +4,6 @@
; CHECK: andl $65534, %
; CHECK-NEXT: movl %
; CHECK-NEXT: movzwl
-; CHECK-NEXT: movl $17
@g_5 = external global i16 ; <i16*> [#uses=2]
@g_107 = external global i16 ; <i16*> [#uses=1]
diff --git a/test/CodeGen/X86/2008-07-19-movups-spills.ll b/test/CodeGen/X86/2008-07-19-movups-spills.ll
index cf04dcf0f18c..368af6d8abde 100644
--- a/test/CodeGen/X86/2008-07-19-movups-spills.ll
+++ b/test/CodeGen/X86/2008-07-19-movups-spills.ll
@@ -1,7 +1,9 @@
-; RUN: llc < %s -mtriple=i686-pc-linux -realign-stack=1 -mattr=sse2 | grep movaps | count 75
-; RUN: llc < %s -mtriple=i686-pc-linux -realign-stack=0 -mattr=sse2 | grep movaps | count 75
+; RUN: llc < %s -mtriple=i686-pc-linux -realign-stack=1 -mattr=sse2 | grep movups | count 33
+; RUN: llc < %s -mtriple=i686-pc-linux -realign-stack=0 -mattr=sse2 | grep movups | count 33
; PR2539
; PR8969 - make 32-bit linux have a 16-byte aligned stack
+; Verify that movups is still generated with an aligned stack for the globals
+; that must be accessed unaligned
external global <4 x float>, align 1 ; <<4 x float>*>:0 [#uses=2]
external global <4 x float>, align 1 ; <<4 x float>*>:1 [#uses=1]
diff --git a/test/CodeGen/X86/2008-08-05-SpillerBug.ll b/test/CodeGen/X86/2008-08-05-SpillerBug.ll
deleted file mode 100644
index d9d95b595bee..000000000000
--- a/test/CodeGen/X86/2008-08-05-SpillerBug.ll
+++ /dev/null
@@ -1,44 +0,0 @@
-; RUN: llc < %s -mtriple=i386-apple-darwin -mcpu=yonah -disable-fp-elim -stats |& grep asm-printer | grep 55
-; PR2568
-
-@g_3 = external global i16 ; <i16*> [#uses=1]
-@g_5 = external global i32 ; <i32*> [#uses=3]
-
-declare i32 @func_15(i16 signext , i16 signext , i32) nounwind
-
-define void @func_9_entry_2E_ce(i8 %p_11) nounwind {
-newFuncRoot:
- br label %entry.ce
-
-entry.ce.ret.exitStub: ; preds = %entry.ce
- ret void
-
-entry.ce: ; preds = %newFuncRoot
- load i16* @g_3, align 2 ; <i16>:0 [#uses=1]
- icmp sgt i16 %0, 0 ; <i1>:1 [#uses=1]
- zext i1 %1 to i32 ; <i32>:2 [#uses=1]
- load i32* @g_5, align 4 ; <i32>:3 [#uses=4]
- icmp ugt i32 %2, %3 ; <i1>:4 [#uses=1]
- zext i1 %4 to i32 ; <i32>:5 [#uses=1]
- icmp eq i32 %3, 0 ; <i1>:6 [#uses=1]
- %.0 = select i1 %6, i32 1, i32 %3 ; <i32> [#uses=1]
- urem i32 1, %.0 ; <i32>:7 [#uses=2]
- sext i8 %p_11 to i16 ; <i16>:8 [#uses=1]
- trunc i32 %3 to i16 ; <i16>:9 [#uses=1]
- tail call i32 @func_15( i16 signext %8, i16 signext %9, i32 1 ) nounwind ; <i32>:10 [#uses=0]
- load i32* @g_5, align 4 ; <i32>:11 [#uses=1]
- trunc i32 %11 to i16 ; <i16>:12 [#uses=1]
- tail call i32 @func_15( i16 signext %12, i16 signext 1, i32 %7 ) nounwind ; <i32>:13 [#uses=0]
- sext i8 %p_11 to i32 ; <i32>:14 [#uses=1]
- %p_11.lobit = lshr i8 %p_11, 7 ; <i8> [#uses=1]
- %tmp = zext i8 %p_11.lobit to i32 ; <i32> [#uses=1]
- %tmp.not = xor i32 %tmp, 1 ; <i32> [#uses=1]
- %.015 = ashr i32 %14, %tmp.not ; <i32> [#uses=2]
- icmp eq i32 %.015, 0 ; <i1>:15 [#uses=1]
- %.016 = select i1 %15, i32 1, i32 %.015 ; <i32> [#uses=1]
- udiv i32 %7, %.016 ; <i32>:16 [#uses=1]
- icmp ult i32 %5, %16 ; <i1>:17 [#uses=1]
- zext i1 %17 to i32 ; <i32>:18 [#uses=1]
- store i32 %18, i32* @g_5, align 4
- br label %entry.ce.ret.exitStub
-}
diff --git a/test/CodeGen/X86/2008-09-18-inline-asm-2.ll b/test/CodeGen/X86/2008-09-18-inline-asm-2.ll
index eadfda0394dd..947a1f17172c 100644
--- a/test/CodeGen/X86/2008-09-18-inline-asm-2.ll
+++ b/test/CodeGen/X86/2008-09-18-inline-asm-2.ll
@@ -1,5 +1,7 @@
-; RUN: llc < %s -march=x86 | grep "#%ebp %edi %ebx 8(%esi) %eax %dl"
-; RUN: llc < %s -march=x86 -regalloc=fast | grep "#%ebx %esi %edi 8(%ebp) %eax %dl"
+; RUN: llc < %s -march=x86 -regalloc=linearscan | grep "#%ebp %edi %ebx 8(%esi) %eax %dl"
+; RUN: llc < %s -march=x86 -regalloc=fast | grep "#%ebx %esi %edi 8(%ebp) %eax %dl"
+; RUN: llc < %s -march=x86 -regalloc=basic | grep "#%ebp %esi %edx 8(%edi) %eax %bl"
+; RUN: llc < %s -march=x86 -regalloc=greedy | grep "#%edx %edi %ebp 8(%esi) %eax %bl"
; The 1st, 2nd, 3rd and 5th registers above must all be different. The registers
; referenced in the 4th and 6th operands must not be the same as the 1st or 5th
diff --git a/test/CodeGen/X86/2008-12-12-PrivateEHSymbol.ll b/test/CodeGen/X86/2008-12-12-PrivateEHSymbol.ll
index e97b63db14d9..2e278118b7ad 100644
--- a/test/CodeGen/X86/2008-12-12-PrivateEHSymbol.ll
+++ b/test/CodeGen/X86/2008-12-12-PrivateEHSymbol.ll
@@ -1,7 +1,5 @@
-; RUN: llc < %s -march=x86-64 -mtriple=x86_64-unknown-linux-gnu | grep ^.L_Z1fv.eh
-; RUN: llc < %s -march=x86 -mtriple=i686-unknown-linux-gnu | grep ^.L_Z1fv.eh
-; RUN: llc < %s -march=x86-64 -mtriple=x86_64-apple-darwin9 | grep ^__Z1fv.eh
-; RUN: llc < %s -march=x86 -mtriple=i386-apple-darwin9 | grep ^__Z1fv.eh
+; RUN: llc < %s -disable-cfi -march=x86-64 -mtriple=x86_64-apple-darwin9 | grep ^__Z1fv.eh
+; RUN: llc < %s -disable-cfi -march=x86 -mtriple=i386-apple-darwin9 | grep ^__Z1fv.eh
define void @_Z1fv() {
entry:
diff --git a/test/CodeGen/X86/2009-02-20-PreAllocSplit-Crash.ll b/test/CodeGen/X86/2009-02-20-PreAllocSplit-Crash.ll
index 58a7f9fb7593..aba4bfcbf52f 100644
--- a/test/CodeGen/X86/2009-02-20-PreAllocSplit-Crash.ll
+++ b/test/CodeGen/X86/2009-02-20-PreAllocSplit-Crash.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -march=x86 -mtriple=i386-apple-darwin8 -pre-alloc-split
+; RUN: llc < %s -march=x86 -mtriple=i386-apple-darwin8 -pre-alloc-split -regalloc=linearscan
define i32 @main() nounwind {
bb4.i.thread:
diff --git a/test/CodeGen/X86/2009-03-11-CoalescerBug.ll b/test/CodeGen/X86/2009-03-11-CoalescerBug.ll
deleted file mode 100644
index d5ba93e10495..000000000000
--- a/test/CodeGen/X86/2009-03-11-CoalescerBug.ll
+++ /dev/null
@@ -1,85 +0,0 @@
-; RUN: llc < %s -mtriple=i386-apple-darwin9 -stats |& grep regcoalescing | grep commuting
-
-@lookupTable5B = external global [64 x i32], align 32 ; <[64 x i32]*> [#uses=1]
-@lookupTable3B = external global [16 x i32], align 32 ; <[16 x i32]*> [#uses=1]
-@disparity0 = external global i32 ; <i32*> [#uses=5]
-@disparity1 = external global i32 ; <i32*> [#uses=3]
-
-define i32 @calc(i32 %theWord, i32 %k) nounwind {
-entry:
- %0 = lshr i32 %theWord, 3 ; <i32> [#uses=1]
- %1 = and i32 %0, 31 ; <i32> [#uses=1]
- %2 = shl i32 %k, 5 ; <i32> [#uses=1]
- %3 = or i32 %1, %2 ; <i32> [#uses=1]
- %4 = and i32 %theWord, 7 ; <i32> [#uses=1]
- %5 = shl i32 %k, 3 ; <i32> [#uses=1]
- %6 = or i32 %5, %4 ; <i32> [#uses=1]
- %7 = getelementptr [64 x i32]* @lookupTable5B, i32 0, i32 %3 ; <i32*> [#uses=1]
- %8 = load i32* %7, align 4 ; <i32> [#uses=5]
- %9 = getelementptr [16 x i32]* @lookupTable3B, i32 0, i32 %6 ; <i32*> [#uses=1]
- %10 = load i32* %9, align 4 ; <i32> [#uses=5]
- %11 = and i32 %8, 65536 ; <i32> [#uses=1]
- %12 = icmp eq i32 %11, 0 ; <i1> [#uses=1]
- br i1 %12, label %bb1, label %bb
-
-bb: ; preds = %entry
- %13 = and i32 %8, 994 ; <i32> [#uses=1]
- %14 = load i32* @disparity0, align 4 ; <i32> [#uses=2]
- store i32 %14, i32* @disparity1, align 4
- br label %bb8
-
-bb1: ; preds = %entry
- %15 = lshr i32 %8, 18 ; <i32> [#uses=1]
- %16 = and i32 %15, 1 ; <i32> [#uses=1]
- %17 = load i32* @disparity0, align 4 ; <i32> [#uses=4]
- %18 = icmp eq i32 %16, %17 ; <i1> [#uses=1]
- %not = select i1 %18, i32 0, i32 994 ; <i32> [#uses=1]
- %.masked = and i32 %8, 994 ; <i32> [#uses=1]
- %result.1 = xor i32 %not, %.masked ; <i32> [#uses=2]
- %19 = and i32 %8, 524288 ; <i32> [#uses=1]
- %20 = icmp eq i32 %19, 0 ; <i1> [#uses=1]
- br i1 %20, label %bb7, label %bb6
-
-bb6: ; preds = %bb1
- %21 = xor i32 %17, 1 ; <i32> [#uses=2]
- store i32 %21, i32* @disparity1, align 4
- br label %bb8
-
-bb7: ; preds = %bb1
- store i32 %17, i32* @disparity1, align 4
- br label %bb8
-
-bb8: ; preds = %bb7, %bb6, %bb
- %22 = phi i32 [ %17, %bb7 ], [ %21, %bb6 ], [ %14, %bb ] ; <i32> [#uses=4]
- %result.0 = phi i32 [ %result.1, %bb7 ], [ %result.1, %bb6 ], [ %13, %bb ] ; <i32> [#uses=2]
- %23 = and i32 %10, 65536 ; <i32> [#uses=1]
- %24 = icmp eq i32 %23, 0 ; <i1> [#uses=1]
- br i1 %24, label %bb10, label %bb9
-
-bb9: ; preds = %bb8
- %25 = and i32 %10, 29 ; <i32> [#uses=1]
- %26 = or i32 %result.0, %25 ; <i32> [#uses=1]
- store i32 %22, i32* @disparity0, align 4
- ret i32 %26
-
-bb10: ; preds = %bb8
- %27 = lshr i32 %10, 18 ; <i32> [#uses=1]
- %28 = and i32 %27, 1 ; <i32> [#uses=1]
- %29 = icmp eq i32 %28, %22 ; <i1> [#uses=1]
- %not13 = select i1 %29, i32 0, i32 29 ; <i32> [#uses=1]
- %.masked20 = and i32 %10, 29 ; <i32> [#uses=1]
- %.pn = xor i32 %not13, %.masked20 ; <i32> [#uses=1]
- %result.3 = or i32 %.pn, %result.0 ; <i32> [#uses=2]
- %30 = and i32 %10, 524288 ; <i32> [#uses=1]
- %31 = icmp eq i32 %30, 0 ; <i1> [#uses=1]
- br i1 %31, label %bb17, label %bb16
-
-bb16: ; preds = %bb10
- %32 = xor i32 %22, 1 ; <i32> [#uses=1]
- store i32 %32, i32* @disparity0, align 4
- ret i32 %result.3
-
-bb17: ; preds = %bb10
- store i32 %22, i32* @disparity0, align 4
- ret i32 %result.3
-}
diff --git a/test/CodeGen/X86/2009-03-16-SpillerBug.ll b/test/CodeGen/X86/2009-03-16-SpillerBug.ll
index 80e7639e7c29..951e191cd293 100644
--- a/test/CodeGen/X86/2009-03-16-SpillerBug.ll
+++ b/test/CodeGen/X86/2009-03-16-SpillerBug.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -mtriple=i386-apple-darwin -stats |& grep virtregrewriter | not grep {stores unfolded}
+; RUN: llc < %s -mtriple=i386-apple-darwin -regalloc=linearscan -stats |& grep virtregrewriter | not grep {stores unfolded}
; rdar://6682365
; Do not clobber a register if another spill slot is available in it and it's marked "do not clobber".
diff --git a/test/CodeGen/X86/2009-04-20-LinearScanOpt.ll b/test/CodeGen/X86/2009-04-20-LinearScanOpt.ll
index fcb2ed07dc13..f739216f825a 100644
--- a/test/CodeGen/X86/2009-04-20-LinearScanOpt.ll
+++ b/test/CodeGen/X86/2009-04-20-LinearScanOpt.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -mtriple=x86_64-apple-darwin10.0 -relocation-model=pic -disable-fp-elim -stats |& grep asm-printer | grep 82
+; RUN: llc < %s -mtriple=x86_64-apple-darwin10.0 -relocation-model=pic -disable-fp-elim -stats |& grep asm-printer | grep 77
; rdar://6802189
; Test if linearscan is unfavoring registers for allocation to allow more reuse
diff --git a/test/CodeGen/X86/2009-04-21-NoReloadImpDef.ll b/test/CodeGen/X86/2009-04-21-NoReloadImpDef.ll
index 69f644f5834b..620e0f366740 100644
--- a/test/CodeGen/X86/2009-04-21-NoReloadImpDef.ll
+++ b/test/CodeGen/X86/2009-04-21-NoReloadImpDef.ll
@@ -1,5 +1,5 @@
; RUN: llc -mtriple=i386-apple-darwin10.0 -relocation-model=pic -asm-verbose=false \
-; RUN: -disable-fp-elim -mattr=-sse41,-sse3,+sse2 -post-RA-scheduler=false < %s | \
+; RUN: -disable-fp-elim -mattr=-sse41,-sse3,+sse2 -post-RA-scheduler=false -regalloc=linearscan < %s | \
; RUN: FileCheck %s
; rdar://6808032
diff --git a/test/CodeGen/X86/2009-04-24.ll b/test/CodeGen/X86/2009-04-24.ll
index dd8823574cde..d6ed0c42230d 100644
--- a/test/CodeGen/X86/2009-04-24.ll
+++ b/test/CodeGen/X86/2009-04-24.ll
@@ -1,6 +1,6 @@
; RUN: llc < %s -march=x86-64 -mtriple=x86_64-linux-gnu -regalloc=fast -relocation-model=pic > %t2
; RUN: grep {leaq.*TLSGD} %t2
-; RUN; grep {__tls_get_addr} %t2
+; RUN: grep {__tls_get_addr} %t2
; PR4004
@i = thread_local global i32 15
diff --git a/test/CodeGen/X86/2010-02-19-TailCallRetAddrBug.ll b/test/CodeGen/X86/2010-02-19-TailCallRetAddrBug.ll
index 7325f4ae1251..f6ac2ba60647 100644
--- a/test/CodeGen/X86/2010-02-19-TailCallRetAddrBug.ll
+++ b/test/CodeGen/X86/2010-02-19-TailCallRetAddrBug.ll
@@ -11,7 +11,7 @@
; Move return address (76(%esp)) to a temporary register (%ebp)
; CHECK: movl 76(%esp), [[REGISTER:%[a-z]+]]
; Overwrite return addresss
-; CHECK: movl %ebx, 76(%esp)
+; CHECK: movl [[EBX:%[a-z]+]], 76(%esp)
; Move return address from temporary register (%ebp) to new stack location (60(%esp))
; CHECK: movl [[REGISTER]], 60(%esp)
diff --git a/test/CodeGen/X86/2010-04-23-mmx-movdq2q.ll b/test/CodeGen/X86/2010-04-23-mmx-movdq2q.ll
index fa3d5fbcdc48..69787c78cfd6 100644
--- a/test/CodeGen/X86/2010-04-23-mmx-movdq2q.ll
+++ b/test/CodeGen/X86/2010-04-23-mmx-movdq2q.ll
@@ -31,18 +31,19 @@ entry:
ret void
}
+; CHECK: ti64
define void @ti64(double %a, double %b) nounwind {
entry:
%tmp1 = bitcast double %a to <1 x i64>
%tmp2 = bitcast double %b to <1 x i64>
%tmp3 = add <1 x i64> %tmp1, %tmp2
-; CHECK: addq %rax, %rcx
+; CHECK: addq
store <1 x i64> %tmp3, <1 x i64>* null
ret void
}
; MMX intrinsics calls get us MMX instructions.
-
+; CHECK: ti8a
define void @ti8a(double %a, double %b) nounwind {
entry:
%tmp1 = bitcast double %a to x86_mmx
diff --git a/test/CodeGen/X86/2010-05-03-CoalescerSubRegClobber.ll b/test/CodeGen/X86/2010-05-03-CoalescerSubRegClobber.ll
index 323925c7ff68..5accfd74c0a9 100644
--- a/test/CodeGen/X86/2010-05-03-CoalescerSubRegClobber.ll
+++ b/test/CodeGen/X86/2010-05-03-CoalescerSubRegClobber.ll
@@ -22,8 +22,8 @@ while.end: ; preds = %while.cond, %entry
%conv = zext i32 %v to i64 ; <i64> [#uses=1]
%conv14 = zext i32 %div11 to i64 ; <i64> [#uses=1]
; Verify that we don't clobber %eax after putting the imulq result in %rax
-; CHECK: imulq %r{{.}}x, %r[[RES:.]]x
-; CHECK-NOT: movl {{.*}}, %e[[RES]]x
+; CHECK: imulq %r{{.}}x, %r[[RES:..]]
+; CHECK-NOT: movl {{.*}}, %e[[RES]]
; CHECK: div
%mul = mul i64 %conv14, %conv ; <i64> [#uses=1]
%conv16 = zext i32 %div to i64 ; <i64> [#uses=1]
diff --git a/test/CodeGen/X86/2010-05-25-DotDebugLoc.ll b/test/CodeGen/X86/2010-05-25-DotDebugLoc.ll
index f9bda7f1007e..848af82da820 100644
--- a/test/CodeGen/X86/2010-05-25-DotDebugLoc.ll
+++ b/test/CodeGen/X86/2010-05-25-DotDebugLoc.ll
@@ -1,4 +1,5 @@
; RUN: llc -march=x86-64 -O2 < %s | FileCheck %s
+; RUN: llc -march=x86-64 -O2 -regalloc=basic < %s | FileCheck %s
; Test to check .debug_loc support. This test case emits many debug_loc entries.
; CHECK: Loc expr size
diff --git a/test/CodeGen/X86/2010-05-26-DotDebugLoc.ll b/test/CodeGen/X86/2010-05-26-DotDebugLoc.ll
index 60171eb62973..6600cc3cae4f 100644
--- a/test/CodeGen/X86/2010-05-26-DotDebugLoc.ll
+++ b/test/CodeGen/X86/2010-05-26-DotDebugLoc.ll
@@ -1,6 +1,7 @@
; RUN: llc -O2 < %s | FileCheck %s
+; RUN: llc -O2 -regalloc=basic < %s | FileCheck %s
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
-target triple = "x86_64-apple-darwin"
+target triple = "x86_64-apple-darwin10"
%struct.a = type { i32, %struct.a* }
@@ -55,12 +56,21 @@ declare void @llvm.dbg.value(metadata, i64, metadata) nounwind readnone
!29 = metadata !{i32 524299, metadata !9, i32 17, i32 0} ; [ DW_TAG_lexical_block ]
!30 = metadata !{i32 19, i32 0, metadata !29, null}
+; The variable bar:myvar changes registers after the first movq.
+; It is cobbered by popq %rbx
+; CHECK: movq
+; CHECK-NEXT: [[LABEL:Ltmp[0-9]*]]
+; CHECK: .loc 1 19 0
+; CHECK: popq
+; CHECK-NEXT: [[CLOBBER:Ltmp[0-9]*]]
+
+
; CHECK: Ldebug_loc0:
; CHECK-NEXT: .quad Lfunc_begin0
-; CHECK-NEXT: .quad Ltmp3
+; CHECK-NEXT: .quad [[LABEL]]
; CHECK-NEXT: .short 1
; CHECK-NEXT: .byte 85
-; CHECK-NEXT: .quad Ltmp3
-; CHECK-NEXT: .quad Ltmp6
+; CHECK-NEXT: .quad [[LABEL]]
+; CHECK-NEXT: .quad [[CLOBBER]]
; CHECK-NEXT: .short 1
; CHECK-NEXT: .byte 83
diff --git a/test/CodeGen/X86/2010-05-28-Crash.ll b/test/CodeGen/X86/2010-05-28-Crash.ll
index ad8546ef8ce8..1a0da3177a22 100644
--- a/test/CodeGen/X86/2010-05-28-Crash.ll
+++ b/test/CodeGen/X86/2010-05-28-Crash.ll
@@ -1,4 +1,5 @@
; RUN: llc -mtriple=x86_64-apple-darwin < %s | FileCheck %s
+; RUN: llc -mtriple=x86_64-apple-darwin -regalloc=basic < %s | FileCheck %s
; Test to check separate label for inlined function argument.
define i32 @foo(i32 %y) nounwind optsize ssp {
diff --git a/test/CodeGen/X86/2010-06-01-DeadArg-DbgInfo.ll b/test/CodeGen/X86/2010-06-01-DeadArg-DbgInfo.ll
index 812d3720d6f5..a9c03ee563d8 100644
--- a/test/CodeGen/X86/2010-06-01-DeadArg-DbgInfo.ll
+++ b/test/CodeGen/X86/2010-06-01-DeadArg-DbgInfo.ll
@@ -1,4 +1,5 @@
-; RUN: llc -O2 < %s | FileCheck %s
+; RUN: llc -O2 < %s | FileCheck %s
+; RUN: llc -O2 -regalloc=basic < %s | FileCheck %s
; Test to check that unused argument 'this' is not undefined in debug info.
target triple = "x86_64-apple-darwin10.2"
diff --git a/test/CodeGen/X86/2010-08-04-StackVariable.ll b/test/CodeGen/X86/2010-08-04-StackVariable.ll
index edfd1b868737..ba36fe7c12fd 100644
--- a/test/CodeGen/X86/2010-08-04-StackVariable.ll
+++ b/test/CodeGen/X86/2010-08-04-StackVariable.ll
@@ -1,5 +1,5 @@
-; RUN: llc -O0 -mtriple=x86_64-apple-darwin < %s | grep DW_OP_fbreg
-; Use DW_OP_fbreg in variable's location expression if the variable is in a stack slot.
+; RUN: llc -O0 -mtriple=x86_64-apple-darwin < %s | grep DW_OP_breg7
+; Use DW_OP_breg7 in variable's location expression if the variable is in a stack slot.
%struct.SVal = type { i8*, i32 }
diff --git a/test/CodeGen/X86/2010-09-17-SideEffectsInChain.ll b/test/CodeGen/X86/2010-09-17-SideEffectsInChain.ll
index 8fe0309421e5..eaede30f9b55 100644
--- a/test/CodeGen/X86/2010-09-17-SideEffectsInChain.ll
+++ b/test/CodeGen/X86/2010-09-17-SideEffectsInChain.ll
@@ -18,9 +18,9 @@ entry:
ret i32 0
}
-; CHECK: movq ___stack_chk_guard@GOTPCREL(%rip), %rax
-; CHECK: movb 30(%rsp), %dl
-; CHECK: movb (%rsp), %sil
-; CHECK: movb %sil, (%rsp)
-; CHECK: movb %dl, 30(%rsp)
+; CHECK: movq ___stack_chk_guard@GOTPCREL(%rip)
+; CHECK: movb 38(%rsp), [[R0:%.+]]
+; CHECK: movb 8(%rsp), [[R1:%.+]]
+; CHECK: movb [[R1]], 8(%rsp)
+; CHECK: movb [[R0]], 38(%rsp)
; CHECK: callq ___stack_chk_fail
diff --git a/test/CodeGen/X86/2010-09-30-CMOV-JumpTable-PHI.ll b/test/CodeGen/X86/2010-09-30-CMOV-JumpTable-PHI.ll
index cae81d086ea1..73e996c5d553 100644
--- a/test/CodeGen/X86/2010-09-30-CMOV-JumpTable-PHI.ll
+++ b/test/CodeGen/X86/2010-09-30-CMOV-JumpTable-PHI.ll
@@ -1,4 +1,4 @@
-; RUN: llc -verify-machineinstrs -cgp-critical-edge-splitting=0 -mcpu=i386 < %s
+; RUN: llc -verify-machineinstrs -mcpu=i386 < %s
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32"
target triple = "i386-pc-linux-gnu"
diff --git a/test/CodeGen/X86/2011-01-24-DbgValue-Before-Use.ll b/test/CodeGen/X86/2011-01-24-DbgValue-Before-Use.ll
index 973975b658a3..7f134113b2e3 100644
--- a/test/CodeGen/X86/2011-01-24-DbgValue-Before-Use.ll
+++ b/test/CodeGen/X86/2011-01-24-DbgValue-Before-Use.ll
@@ -1,4 +1,5 @@
; RUN: llc < %s | FileCheck %s
+; RUN: llc < %s -regalloc=basic | FileCheck %s
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
target triple = "x86_64-apple-darwin10.0.0"
diff --git a/test/CodeGen/X86/2011-02-27-Fpextend.ll b/test/CodeGen/X86/2011-02-27-Fpextend.ll
new file mode 100644
index 000000000000..c12b9563b305
--- /dev/null
+++ b/test/CodeGen/X86/2011-02-27-Fpextend.ll
@@ -0,0 +1,7 @@
+; RUN: llc -mtriple=x86_64-pc-linux < %s
+; PR9309
+
+define <4 x double> @f_fu(<4 x float>) nounwind {
+ %float2double.i = fpext <4 x float> %0 to <4 x double>
+ ret <4 x double> %float2double.i
+}
diff --git a/test/CodeGen/X86/2011-03-02-DAGCombiner.ll b/test/CodeGen/X86/2011-03-02-DAGCombiner.ll
new file mode 100644
index 000000000000..be58cedfdaa7
--- /dev/null
+++ b/test/CodeGen/X86/2011-03-02-DAGCombiner.ll
@@ -0,0 +1,51 @@
+; RUN: llc < %s -march=x86-64
+
+target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
+target triple = "x86_64-apple-darwin11.0.0"
+
+%0 = type { i8, [3 x i8] }
+%struct.anon = type { float, x86_fp80 }
+
+define i32 @main() nounwind ssp {
+entry:
+ %retval = alloca i32, align 4
+ %F = alloca %struct.anon, align 16
+ %K = alloca %0, align 4
+ store i32 0, i32* %retval
+ %0 = bitcast %0* %K to i32*
+ %1 = load i32* %0, align 4
+ %2 = and i32 %1, -121
+ %3 = or i32 %2, 32
+ store i32 %3, i32* %0, align 4
+ %4 = bitcast %0* %K to i32*
+ %5 = load i32* %4, align 4
+ %6 = lshr i32 %5, 3
+ %bf.clear = and i32 %6, 15
+ %conv = sitofp i32 %bf.clear to float
+ %f = getelementptr inbounds %struct.anon* %F, i32 0, i32 0
+ %tmp = load float* %f, align 4
+ %sub = fsub float %tmp, %conv
+ store float %sub, float* %f, align 4
+ %ld = getelementptr inbounds %struct.anon* %F, i32 0, i32 1
+ %tmp1 = load x86_fp80* %ld, align 16
+ %7 = bitcast %0* %K to i32*
+ %8 = load i32* %7, align 4
+ %9 = lshr i32 %8, 7
+ %bf.clear2 = and i32 %9, 1
+ %conv3 = uitofp i32 %bf.clear2 to x86_fp80
+ %sub4 = fsub x86_fp80 %conv3, %tmp1
+ %conv5 = fptoui x86_fp80 %sub4 to i32
+ %bf.value = and i32 %conv5, 1
+ %10 = bitcast %0* %K to i32*
+ %11 = and i32 %bf.value, 1
+ %12 = shl i32 %11, 7
+ %13 = load i32* %10, align 4
+ %14 = and i32 %13, -129
+ %15 = or i32 %14, %12
+ store i32 %15, i32* %10, align 4
+ %call = call i32 (...)* @iequals(i32 1841, i32 %bf.value, i32 0)
+ %16 = load i32* %retval
+ ret i32 %16
+}
+
+declare i32 @iequals(...)
diff --git a/test/CodeGen/X86/2011-03-08-Sched-crash.ll b/test/CodeGen/X86/2011-03-08-Sched-crash.ll
new file mode 100644
index 000000000000..6329ae670e48
--- /dev/null
+++ b/test/CodeGen/X86/2011-03-08-Sched-crash.ll
@@ -0,0 +1,56 @@
+; RUN: llc < %s
+target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128-n8:16:32"
+target triple = "i386-apple-darwin9.0.0"
+
+%0 = type { i32, i1 }
+
+declare %0 @llvm.umul.with.overflow.i32(i32, i32) nounwind readnone
+
+define linkonce_odr hidden void @_ZN2js5QueueINS_7SlotMap8SlotInfoEE6ensureEj(i8* nocapture %this, i32 %size) nounwind align 2 {
+ br i1 undef, label %14, label %1
+
+; <label>:1 ; preds = %0
+ br i1 undef, label %2, label %3
+
+; <label>:2 ; preds = %1
+ br label %3
+
+; <label>:3 ; preds = %2, %1
+ br i1 undef, label %13, label %4
+
+; <label>:4 ; preds = %3
+ %5 = tail call %0 @llvm.umul.with.overflow.i32(i32 undef, i32 16)
+ %6 = extractvalue %0 %5, 1
+ %7 = extractvalue %0 %5, 0
+ %.op = add i32 %7, 7
+ %.op.op = and i32 %.op, -8
+ %8 = select i1 %6, i32 0, i32 %.op.op
+ br i1 undef, label %10, label %9
+
+; <label>:9 ; preds = %4
+ br label %_ZnamRN7nanojit9AllocatorE.exit
+
+; <label>:10 ; preds = %4
+ %11 = tail call i8* @_ZN7nanojit9Allocator9allocSlowEmb(i8* undef, i32 %8, i1 zeroext false) nounwind
+ br label %_ZnamRN7nanojit9AllocatorE.exit
+
+_ZnamRN7nanojit9AllocatorE.exit: ; preds = %10, %9
+ br i1 false, label %._crit_edge, label %.lr.ph
+
+.lr.ph: ; preds = %_ZnamRN7nanojit9AllocatorE.exit
+ br label %12
+
+; <label>:12 ; preds = %12, %.lr.ph
+ br i1 undef, label %._crit_edge, label %12
+
+._crit_edge: ; preds = %12, %_ZnamRN7nanojit9AllocatorE.exit
+ br label %14
+
+; <label>:13 ; preds = %3
+ br label %14
+
+; <label>:14 ; preds = %13, %._crit_edge, %0
+ ret void
+}
+
+declare i8* @_ZN7nanojit9Allocator9allocSlowEmb(i8*, i32, i1 zeroext)
diff --git a/test/CodeGen/X86/2011-03-09-Physreg-Coalescing.ll b/test/CodeGen/X86/2011-03-09-Physreg-Coalescing.ll
new file mode 100644
index 000000000000..e48edf7e30b4
--- /dev/null
+++ b/test/CodeGen/X86/2011-03-09-Physreg-Coalescing.ll
@@ -0,0 +1,22 @@
+; RUN: llc -mcpu=yonah < %s
+; PR9438
+target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32"
+target triple = "i386-unknown-freebsd9.0"
+
+; The 'call fastcc' ties down %ebx, %ecx, and %edx.
+; A MUL8r ties down %al, leaving no GR32_ABCD registers available.
+; The coalescer can easily overallocate physical registers,
+; and register allocation fails.
+
+declare fastcc i8* @save_string(i8* %d, i8* nocapture %s) nounwind
+
+define i32 @cvtchar(i8* nocapture %sp) nounwind {
+ %temp.i = alloca [2 x i8], align 1
+ %tmp1 = load i8* %sp, align 1
+ %div = udiv i8 %tmp1, 10
+ %rem = urem i8 %div, 10
+ %arrayidx.i = getelementptr inbounds [2 x i8]* %temp.i, i32 0, i32 0
+ store i8 %rem, i8* %arrayidx.i, align 1
+ %call.i = call fastcc i8* @save_string(i8* %sp, i8* %arrayidx.i) nounwind
+ ret i32 undef
+}
diff --git a/test/CodeGen/X86/2011-03-30-CreateFixedObjCrash.ll b/test/CodeGen/X86/2011-03-30-CreateFixedObjCrash.ll
new file mode 100644
index 000000000000..38a9b3d4f5cc
--- /dev/null
+++ b/test/CodeGen/X86/2011-03-30-CreateFixedObjCrash.ll
@@ -0,0 +1,10 @@
+; RUN: llc < %s -march=x86
+
+; rdar://7983260
+
+%struct.T0 = type {}
+
+define void @fn4(%struct.T0* byval %arg0) nounwind ssp {
+entry:
+ ret void
+}
diff --git a/test/CodeGen/X86/2011-04-13-SchedCmpJmp.ll b/test/CodeGen/X86/2011-04-13-SchedCmpJmp.ll
new file mode 100644
index 000000000000..07b1971218c3
--- /dev/null
+++ b/test/CodeGen/X86/2011-04-13-SchedCmpJmp.ll
@@ -0,0 +1,65 @@
+; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=yonah | FileCheck %s
+; Reduced from JavaScriptCore
+
+%"class.JSC::CodeLocationCall" = type { [8 x i8] }
+%"class.JSC::JSGlobalData" = type { [4 x i8] }
+%"class.JSC::FunctionPtr" = type { i8* }
+%"class.JSC::Structure" = type { [4 x i8] }
+%"class.JSC::UString" = type { i8* }
+%"class.JSC::JSString" = type { [16 x i8], i32, %"class.JSC::UString", i32 }
+
+declare hidden fastcc void @_ZN3JSCL23returnToThrowTrampolineEPNS_12JSGlobalDataENS_16ReturnAddressPtrERS2_(%"class.JSC::JSGlobalData"* nocapture, i8*, %"class.JSC::FunctionPtr"* nocapture) nounwind noinline ssp
+
+; Avoid hoisting the test above loads or copies
+; CHECK: %entry
+; CHECK: cmpq
+; CHECK-NOT: mov
+; CHECK: jb
+define i32 @cti_op_eq(i8** nocapture %args) nounwind ssp {
+entry:
+ %0 = load i8** null, align 8
+ %tmp13 = bitcast i8* %0 to %"class.JSC::CodeLocationCall"*
+ %tobool.i.i.i = icmp ugt i8* undef, inttoptr (i64 281474976710655 to i8*)
+ %or.cond.i = and i1 %tobool.i.i.i, undef
+ br i1 %or.cond.i, label %if.then.i, label %if.end.i
+
+if.then.i: ; preds = %entry
+ br i1 undef, label %if.then.i.i.i, label %_ZN3JSC7JSValue19equalSlowCaseInlineEPNS_9ExecStateES0_S0_.exit
+
+if.then.i.i.i: ; preds = %if.then.i
+ %conv.i.i.i.i = trunc i64 undef to i32
+ br label %_ZN3JSC7JSValue19equalSlowCaseInlineEPNS_9ExecStateES0_S0_.exit
+
+if.end.i: ; preds = %entry
+ br i1 undef, label %land.rhs.i121.i, label %_ZNK3JSC7JSValue8isStringEv.exit122.i
+
+land.rhs.i121.i: ; preds = %if.end.i
+ %tmp.i.i117.i = load %"class.JSC::Structure"** undef, align 8
+ br label %_ZNK3JSC7JSValue8isStringEv.exit122.i
+
+_ZNK3JSC7JSValue8isStringEv.exit122.i: ; preds = %land.rhs.i121.i, %if.end.i
+ %brmerge.i = or i1 undef, false
+ %or.cond = or i1 false, %brmerge.i
+ br i1 %or.cond, label %_ZN3JSC7JSValue19equalSlowCaseInlineEPNS_9ExecStateES0_S0_.exit, label %if.then.i92.i
+
+if.then.i92.i: ; preds = %_ZNK3JSC7JSValue8isStringEv.exit122.i
+ tail call void @_ZNK3JSC8JSString11resolveRopeEPNS_9ExecStateE(%"class.JSC::JSString"* undef, %"class.JSC::CodeLocationCall"* %tmp13) nounwind
+ unreachable
+
+_ZN3JSC7JSValue19equalSlowCaseInlineEPNS_9ExecStateES0_S0_.exit: ; preds = %_ZNK3JSC7JSValue8isStringEv.exit122.i, %if.then.i.i.i, %if.then.i
+
+ %1 = load i8** undef, align 8
+ br i1 undef, label %do.end39, label %do.body27
+
+do.body27: ; preds = %_ZN3JSC7JSValue19equalSlowCaseInlineEPNS_9ExecStateES0_S0_.exit
+ %tmp30 = bitcast i8* %1 to %"class.JSC::JSGlobalData"*
+ %2 = getelementptr inbounds i8** %args, i64 -1
+ %3 = bitcast i8** %2 to %"class.JSC::FunctionPtr"*
+ tail call fastcc void @_ZN3JSCL23returnToThrowTrampolineEPNS_12JSGlobalDataENS_16ReturnAddressPtrERS2_(%"class.JSC::JSGlobalData"* %tmp30, i8* undef, %"class.JSC::FunctionPtr"* %3)
+ unreachable
+
+do.end39: ; preds = %_ZN3JSC7JSValue19equalSlowCaseInlineEPNS_9ExecStateES0_S0_.exit
+ ret i32 undef
+}
+
+declare void @_ZNK3JSC8JSString11resolveRopeEPNS_9ExecStateE(%"class.JSC::JSString"*, %"class.JSC::CodeLocationCall"*)
diff --git a/test/CodeGen/X86/3dnow-intrinsics.ll b/test/CodeGen/X86/3dnow-intrinsics.ll
new file mode 100644
index 000000000000..0b27bf2d1853
--- /dev/null
+++ b/test/CodeGen/X86/3dnow-intrinsics.ll
@@ -0,0 +1,297 @@
+; RUN: llc < %s -march=x86 -mattr=+3dnow | FileCheck %s
+
+define <8 x i8> @test_pavgusb(x86_mmx %a.coerce, x86_mmx %b.coerce) nounwind readnone {
+; CHECK: pavgusb
+entry:
+ %0 = bitcast x86_mmx %a.coerce to <8 x i8>
+ %1 = bitcast x86_mmx %b.coerce to <8 x i8>
+ %2 = bitcast <8 x i8> %0 to x86_mmx
+ %3 = bitcast <8 x i8> %1 to x86_mmx
+ %4 = call x86_mmx @llvm.x86.3dnow.pavgusb(x86_mmx %2, x86_mmx %3)
+ %5 = bitcast x86_mmx %4 to <8 x i8>
+ ret <8 x i8> %5
+}
+
+declare x86_mmx @llvm.x86.3dnow.pavgusb(x86_mmx, x86_mmx) nounwind readnone
+
+define <2 x i32> @test_pf2id(<2 x float> %a) nounwind readnone {
+; CHECK: pf2id
+entry:
+ %0 = bitcast <2 x float> %a to x86_mmx
+ %1 = tail call x86_mmx @llvm.x86.3dnow.pf2id(x86_mmx %0)
+ %2 = bitcast x86_mmx %1 to <2 x i32>
+ ret <2 x i32> %2
+}
+
+declare x86_mmx @llvm.x86.3dnow.pf2id(x86_mmx) nounwind readnone
+
+define <2 x float> @test_pfacc(<2 x float> %a, <2 x float> %b) nounwind readnone {
+; CHECK: pfacc
+entry:
+ %0 = bitcast <2 x float> %a to x86_mmx
+ %1 = bitcast <2 x float> %b to x86_mmx
+ %2 = tail call x86_mmx @llvm.x86.3dnow.pfacc(x86_mmx %0, x86_mmx %1)
+ %3 = bitcast x86_mmx %2 to <2 x float>
+ ret <2 x float> %3
+}
+
+declare x86_mmx @llvm.x86.3dnow.pfacc(x86_mmx, x86_mmx) nounwind readnone
+
+define <2 x float> @test_pfadd(<2 x float> %a, <2 x float> %b) nounwind readnone {
+; CHECK: pfadd
+entry:
+ %0 = bitcast <2 x float> %a to x86_mmx
+ %1 = bitcast <2 x float> %b to x86_mmx
+ %2 = tail call x86_mmx @llvm.x86.3dnow.pfadd(x86_mmx %0, x86_mmx %1)
+ %3 = bitcast x86_mmx %2 to <2 x float>
+ ret <2 x float> %3
+}
+
+declare x86_mmx @llvm.x86.3dnow.pfadd(x86_mmx, x86_mmx) nounwind readnone
+
+define <2 x i32> @test_pfcmpeq(<2 x float> %a, <2 x float> %b) nounwind readnone {
+; CHECK: pfcmpeq
+entry:
+ %0 = bitcast <2 x float> %a to x86_mmx
+ %1 = bitcast <2 x float> %b to x86_mmx
+ %2 = tail call x86_mmx @llvm.x86.3dnow.pfcmpeq(x86_mmx %0, x86_mmx %1)
+ %3 = bitcast x86_mmx %2 to <2 x i32>
+ ret <2 x i32> %3
+}
+
+declare x86_mmx @llvm.x86.3dnow.pfcmpeq(x86_mmx, x86_mmx) nounwind readnone
+
+define <2 x i32> @test_pfcmpge(<2 x float> %a, <2 x float> %b) nounwind readnone {
+; CHECK: pfcmpge
+entry:
+ %0 = bitcast <2 x float> %a to x86_mmx
+ %1 = bitcast <2 x float> %b to x86_mmx
+ %2 = tail call x86_mmx @llvm.x86.3dnow.pfcmpge(x86_mmx %0, x86_mmx %1)
+ %3 = bitcast x86_mmx %2 to <2 x i32>
+ ret <2 x i32> %3
+}
+
+declare x86_mmx @llvm.x86.3dnow.pfcmpge(x86_mmx, x86_mmx) nounwind readnone
+
+define <2 x i32> @test_pfcmpgt(<2 x float> %a, <2 x float> %b) nounwind readnone {
+; CHECK: pfcmpgt
+entry:
+ %0 = bitcast <2 x float> %a to x86_mmx
+ %1 = bitcast <2 x float> %b to x86_mmx
+ %2 = tail call x86_mmx @llvm.x86.3dnow.pfcmpgt(x86_mmx %0, x86_mmx %1)
+ %3 = bitcast x86_mmx %2 to <2 x i32>
+ ret <2 x i32> %3
+}
+
+declare x86_mmx @llvm.x86.3dnow.pfcmpgt(x86_mmx, x86_mmx) nounwind readnone
+
+define <2 x float> @test_pfmax(<2 x float> %a, <2 x float> %b) nounwind readnone {
+; CHECK: pfmax
+entry:
+ %0 = bitcast <2 x float> %a to x86_mmx
+ %1 = bitcast <2 x float> %b to x86_mmx
+ %2 = tail call x86_mmx @llvm.x86.3dnow.pfmax(x86_mmx %0, x86_mmx %1)
+ %3 = bitcast x86_mmx %2 to <2 x float>
+ ret <2 x float> %3
+}
+
+declare x86_mmx @llvm.x86.3dnow.pfmax(x86_mmx, x86_mmx) nounwind readnone
+
+define <2 x float> @test_pfmin(<2 x float> %a, <2 x float> %b) nounwind readnone {
+; CHECK: pfmin
+entry:
+ %0 = bitcast <2 x float> %a to x86_mmx
+ %1 = bitcast <2 x float> %b to x86_mmx
+ %2 = tail call x86_mmx @llvm.x86.3dnow.pfmin(x86_mmx %0, x86_mmx %1)
+ %3 = bitcast x86_mmx %2 to <2 x float>
+ ret <2 x float> %3
+}
+
+declare x86_mmx @llvm.x86.3dnow.pfmin(x86_mmx, x86_mmx) nounwind readnone
+
+define <2 x float> @test_pfmul(<2 x float> %a, <2 x float> %b) nounwind readnone {
+; CHECK: pfmul
+entry:
+ %0 = bitcast <2 x float> %a to x86_mmx
+ %1 = bitcast <2 x float> %b to x86_mmx
+ %2 = tail call x86_mmx @llvm.x86.3dnow.pfmul(x86_mmx %0, x86_mmx %1)
+ %3 = bitcast x86_mmx %2 to <2 x float>
+ ret <2 x float> %3
+}
+
+declare x86_mmx @llvm.x86.3dnow.pfmul(x86_mmx, x86_mmx) nounwind readnone
+
+define <2 x float> @test_pfrcp(<2 x float> %a) nounwind readnone {
+; CHECK: pfrcp
+entry:
+ %0 = bitcast <2 x float> %a to x86_mmx
+ %1 = tail call x86_mmx @llvm.x86.3dnow.pfrcp(x86_mmx %0)
+ %2 = bitcast x86_mmx %1 to <2 x float>
+ ret <2 x float> %2
+}
+
+declare x86_mmx @llvm.x86.3dnow.pfrcp(x86_mmx) nounwind readnone
+
+define <2 x float> @test_pfrcpit1(<2 x float> %a, <2 x float> %b) nounwind readnone {
+; CHECK: pfrcpit1
+entry:
+ %0 = bitcast <2 x float> %a to x86_mmx
+ %1 = bitcast <2 x float> %b to x86_mmx
+ %2 = tail call x86_mmx @llvm.x86.3dnow.pfrcpit1(x86_mmx %0, x86_mmx %1)
+ %3 = bitcast x86_mmx %2 to <2 x float>
+ ret <2 x float> %3
+}
+
+declare x86_mmx @llvm.x86.3dnow.pfrcpit1(x86_mmx, x86_mmx) nounwind readnone
+
+define <2 x float> @test_pfrcpit2(<2 x float> %a, <2 x float> %b) nounwind readnone {
+; CHECK: pfrcpit2
+entry:
+ %0 = bitcast <2 x float> %a to x86_mmx
+ %1 = bitcast <2 x float> %b to x86_mmx
+ %2 = tail call x86_mmx @llvm.x86.3dnow.pfrcpit2(x86_mmx %0, x86_mmx %1)
+ %3 = bitcast x86_mmx %2 to <2 x float>
+ ret <2 x float> %3
+}
+
+declare x86_mmx @llvm.x86.3dnow.pfrcpit2(x86_mmx, x86_mmx) nounwind readnone
+
+define <2 x float> @test_pfrsqrt(<2 x float> %a) nounwind readnone {
+; CHECK: pfrsqrt
+entry:
+ %0 = bitcast <2 x float> %a to x86_mmx
+ %1 = tail call x86_mmx @llvm.x86.3dnow.pfrsqrt(x86_mmx %0)
+ %2 = bitcast x86_mmx %1 to <2 x float>
+ ret <2 x float> %2
+}
+
+declare x86_mmx @llvm.x86.3dnow.pfrsqrt(x86_mmx) nounwind readnone
+
+define <2 x float> @test_pfrsqit1(<2 x float> %a, <2 x float> %b) nounwind readnone {
+; CHECK: pfrsqit1
+entry:
+ %0 = bitcast <2 x float> %a to x86_mmx
+ %1 = bitcast <2 x float> %b to x86_mmx
+ %2 = tail call x86_mmx @llvm.x86.3dnow.pfrsqit1(x86_mmx %0, x86_mmx %1)
+ %3 = bitcast x86_mmx %2 to <2 x float>
+ ret <2 x float> %3
+}
+
+declare x86_mmx @llvm.x86.3dnow.pfrsqit1(x86_mmx, x86_mmx) nounwind readnone
+
+define <2 x float> @test_pfsub(<2 x float> %a, <2 x float> %b) nounwind readnone {
+; CHECK: pfsub
+entry:
+ %0 = bitcast <2 x float> %a to x86_mmx
+ %1 = bitcast <2 x float> %b to x86_mmx
+ %2 = tail call x86_mmx @llvm.x86.3dnow.pfsub(x86_mmx %0, x86_mmx %1)
+ %3 = bitcast x86_mmx %2 to <2 x float>
+ ret <2 x float> %3
+}
+
+declare x86_mmx @llvm.x86.3dnow.pfsub(x86_mmx, x86_mmx) nounwind readnone
+
+define <2 x float> @test_pfsubr(<2 x float> %a, <2 x float> %b) nounwind readnone {
+; CHECK: pfsubr
+entry:
+ %0 = bitcast <2 x float> %a to x86_mmx
+ %1 = bitcast <2 x float> %b to x86_mmx
+ %2 = tail call x86_mmx @llvm.x86.3dnow.pfsubr(x86_mmx %0, x86_mmx %1)
+ %3 = bitcast x86_mmx %2 to <2 x float>
+ ret <2 x float> %3
+}
+
+declare x86_mmx @llvm.x86.3dnow.pfsubr(x86_mmx, x86_mmx) nounwind readnone
+
+define <2 x float> @test_pi2fd(x86_mmx %a.coerce) nounwind readnone {
+; CHECK: pi2fd
+entry:
+ %0 = bitcast x86_mmx %a.coerce to <2 x i32>
+ %1 = bitcast <2 x i32> %0 to x86_mmx
+ %2 = call x86_mmx @llvm.x86.3dnow.pi2fd(x86_mmx %1)
+ %3 = bitcast x86_mmx %2 to <2 x float>
+ ret <2 x float> %3
+}
+
+declare x86_mmx @llvm.x86.3dnow.pi2fd(x86_mmx) nounwind readnone
+
+define <4 x i16> @test_pmulhrw(x86_mmx %a.coerce, x86_mmx %b.coerce) nounwind readnone {
+; CHECK: pmulhrw
+entry:
+ %0 = bitcast x86_mmx %a.coerce to <4 x i16>
+ %1 = bitcast x86_mmx %b.coerce to <4 x i16>
+ %2 = bitcast <4 x i16> %0 to x86_mmx
+ %3 = bitcast <4 x i16> %1 to x86_mmx
+ %4 = call x86_mmx @llvm.x86.3dnow.pmulhrw(x86_mmx %2, x86_mmx %3)
+ %5 = bitcast x86_mmx %4 to <4 x i16>
+ ret <4 x i16> %5
+}
+
+declare x86_mmx @llvm.x86.3dnow.pmulhrw(x86_mmx, x86_mmx) nounwind readnone
+
+define <2 x i32> @test_pf2iw(<2 x float> %a) nounwind readnone {
+; CHECK: pf2iw
+entry:
+ %0 = bitcast <2 x float> %a to x86_mmx
+ %1 = tail call x86_mmx @llvm.x86.3dnowa.pf2iw(x86_mmx %0)
+ %2 = bitcast x86_mmx %1 to <2 x i32>
+ ret <2 x i32> %2
+}
+
+declare x86_mmx @llvm.x86.3dnowa.pf2iw(x86_mmx) nounwind readnone
+
+define <2 x float> @test_pfnacc(<2 x float> %a, <2 x float> %b) nounwind readnone {
+; CHECK: pfnacc
+entry:
+ %0 = bitcast <2 x float> %a to x86_mmx
+ %1 = bitcast <2 x float> %b to x86_mmx
+ %2 = tail call x86_mmx @llvm.x86.3dnowa.pfnacc(x86_mmx %0, x86_mmx %1)
+ %3 = bitcast x86_mmx %2 to <2 x float>
+ ret <2 x float> %3
+}
+
+declare x86_mmx @llvm.x86.3dnowa.pfnacc(x86_mmx, x86_mmx) nounwind readnone
+
+define <2 x float> @test_pfpnacc(<2 x float> %a, <2 x float> %b) nounwind readnone {
+; CHECK: pfpnacc
+entry:
+ %0 = bitcast <2 x float> %a to x86_mmx
+ %1 = bitcast <2 x float> %b to x86_mmx
+ %2 = tail call x86_mmx @llvm.x86.3dnowa.pfpnacc(x86_mmx %0, x86_mmx %1)
+ %3 = bitcast x86_mmx %2 to <2 x float>
+ ret <2 x float> %3
+}
+
+declare x86_mmx @llvm.x86.3dnowa.pfpnacc(x86_mmx, x86_mmx) nounwind readnone
+
+define <2 x float> @test_pi2fw(x86_mmx %a.coerce) nounwind readnone {
+; CHECK: pi2fw
+entry:
+ %0 = bitcast x86_mmx %a.coerce to <2 x i32>
+ %1 = bitcast <2 x i32> %0 to x86_mmx
+ %2 = call x86_mmx @llvm.x86.3dnowa.pi2fw(x86_mmx %1)
+ %3 = bitcast x86_mmx %2 to <2 x float>
+ ret <2 x float> %3
+}
+
+declare x86_mmx @llvm.x86.3dnowa.pi2fw(x86_mmx) nounwind readnone
+
+define <2 x float> @test_pswapdsf(<2 x float> %a) nounwind readnone {
+; CHECK: pswapd
+entry:
+ %0 = bitcast <2 x float> %a to x86_mmx
+ %1 = tail call x86_mmx @llvm.x86.3dnowa.pswapd(x86_mmx %0)
+ %2 = bitcast x86_mmx %1 to <2 x float>
+ ret <2 x float> %2
+}
+
+define <2 x i32> @test_pswapdsi(<2 x i32> %a) nounwind readnone {
+; CHECK: pswapd
+entry:
+ %0 = bitcast <2 x i32> %a to x86_mmx
+ %1 = tail call x86_mmx @llvm.x86.3dnowa.pswapd(x86_mmx %0)
+ %2 = bitcast x86_mmx %1 to <2 x i32>
+ ret <2 x i32> %2
+}
+
+declare x86_mmx @llvm.x86.3dnowa.pswapd(x86_mmx) nounwind readnone
diff --git a/test/CodeGen/X86/MachineSink-PHIUse.ll b/test/CodeGen/X86/MachineSink-PHIUse.ll
index 728e37736018..3758fd8ce500 100644
--- a/test/CodeGen/X86/MachineSink-PHIUse.ll
+++ b/test/CodeGen/X86/MachineSink-PHIUse.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -mtriple=x86_64-appel-darwin -stats |& grep {machine-sink}
+; RUN: llc < %s -mtriple=x86_64-appel-darwin -disable-cgp-branch-opts -stats |& grep {machine-sink}
define fastcc void @t() nounwind ssp {
entry:
diff --git a/test/CodeGen/X86/SIMD/dg.exp b/test/CodeGen/X86/SIMD/dg.exp
new file mode 100644
index 000000000000..629a14773615
--- /dev/null
+++ b/test/CodeGen/X86/SIMD/dg.exp
@@ -0,0 +1,5 @@
+load_lib llvm.exp
+
+if { [llvm_supports_target X86] } {
+ RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]]
+}
diff --git a/test/CodeGen/X86/SIMD/notvunpcklpd.ll b/test/CodeGen/X86/SIMD/notvunpcklpd.ll
new file mode 100644
index 000000000000..3afc2f2305ab
--- /dev/null
+++ b/test/CodeGen/X86/SIMD/notvunpcklpd.ll
@@ -0,0 +1,20 @@
+; RUN: llc < %s -mattr=+avx | FileCheck %s
+
+target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
+target triple = "x86_64-unknown-linux-gnu"
+
+define void @try_([2 x <4 x double>]* noalias %incarray, [2 x <4 x double>]* noalias %incarrayb ) {
+entry:
+ %incarray1 = alloca [2 x <4 x double>]*, align 8
+ %incarrayb1 = alloca [2 x <4 x double>]*, align 8
+ %carray = alloca [2 x <4 x double>], align 16
+ %r = getelementptr [2 x <4 x double>]* %incarray, i32 0, i32 0
+ %rb = getelementptr [2 x <4 x double>]* %incarrayb, i32 0, i32 0
+ %r3 = load <4 x double>* %r, align 8
+ %r4 = load <4 x double>* %rb, align 8
+ %r11 = shufflevector <4 x double> %r3, <4 x double> %r4, <4 x i32> < i32 0, i32 4, i32 1, i32 5 > ; <<4 x double>> [#uses=1]
+; CHECK-NOT: vunpcklpd
+ %r12 = getelementptr [2 x <4 x double>]* %carray, i32 0, i32 1
+ store <4 x double> %r11, <4 x double>* %r12, align 4
+ ret void
+}
diff --git a/test/CodeGen/X86/SIMD/notvunpcklps.ll b/test/CodeGen/X86/SIMD/notvunpcklps.ll
new file mode 100644
index 000000000000..19daa3e7d508
--- /dev/null
+++ b/test/CodeGen/X86/SIMD/notvunpcklps.ll
@@ -0,0 +1,20 @@
+; RUN: llc < %s -mattr=+avx | FileCheck %s
+
+target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
+target triple = "x86_64-unknown-linux-gnu"
+
+define void @try_([2 x <8 x float>]* noalias %incarray, [2 x <8 x float>]* noalias %incarrayb ) {
+enmtry:
+ %incarray1 = alloca [2 x <8 x float>]*, align 8
+ %incarrayb1 = alloca [2 x <8 x float>]*, align 8
+ %carray = alloca [2 x <8 x float>], align 16
+ %r = getelementptr [2 x <8 x float>]* %incarray, i32 0, i32 0
+ %rb = getelementptr [2 x <8 x float>]* %incarrayb, i32 0, i32 0
+ %r3 = load <8 x float>* %r, align 8
+ %r4 = load <8 x float>* %rb, align 8
+ %r8 = shufflevector <8 x float> %r3, <8 x float> %r4, <8 x i32> < i32 0, i32 8, i32 1, i32 9, i32 2, i32 10, i32 3, i32 11 > ; <<8 x float>> [#uses=1]
+; CHECK-NOT: vunpcklps
+ %r9 = getelementptr [2 x <8 x float>]* %carray, i32 0, i32 0
+ store <8 x float> %r8, <8 x float>* %r9, align 4
+ ret void
+}
diff --git a/test/CodeGen/X86/SIMD/vunpcklpd.ll b/test/CodeGen/X86/SIMD/vunpcklpd.ll
new file mode 100644
index 000000000000..60d23a4f6789
--- /dev/null
+++ b/test/CodeGen/X86/SIMD/vunpcklpd.ll
@@ -0,0 +1,20 @@
+; RUN: llc < %s -mattr=+avx | FileCheck %s
+
+target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
+target triple = "x86_64-unknown-linux-gnu"
+
+define void @try_([2 x <4 x double>]* noalias %incarray, [2 x <4 x double>]* noalias %incarrayb ) {
+entry:
+ %incarray1 = alloca [2 x <4 x double>]*, align 8
+ %incarrayb1 = alloca [2 x <4 x double>]*, align 8
+ %carray = alloca [2 x <4 x double>], align 16
+ %r = getelementptr [2 x <4 x double>]* %incarray, i32 0, i32 0
+ %rb = getelementptr [2 x <4 x double>]* %incarrayb, i32 0, i32 0
+ %r3 = load <4 x double>* %r, align 8
+ %r4 = load <4 x double>* %rb, align 8
+ %r11 = shufflevector <4 x double> %r3, <4 x double> %r4, <4 x i32> < i32 0, i32 4, i32 2, i32 6 > ; <<4 x double>> [#uses=1]
+; CHECK: vunpcklpd
+ %r12 = getelementptr [2 x <4 x double>]* %carray, i32 0, i32 1
+ store <4 x double> %r11, <4 x double>* %r12, align 4
+ ret void
+}
diff --git a/test/CodeGen/X86/SIMD/vunpcklps.ll b/test/CodeGen/X86/SIMD/vunpcklps.ll
new file mode 100644
index 000000000000..a87b29965eaa
--- /dev/null
+++ b/test/CodeGen/X86/SIMD/vunpcklps.ll
@@ -0,0 +1,20 @@
+; RUN: llc < %s -mattr=+avx | FileCheck %s
+
+target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
+target triple = "x86_64-unknown-linux-gnu"
+
+define void @try_([2 x <8 x float>]* noalias %incarray, [2 x <8 x float>]* noalias %incarrayb ) {
+entry:
+ %incarray1 = alloca [2 x <8 x float>]*, align 8
+ %incarrayb1 = alloca [2 x <8 x float>]*, align 8
+ %carray = alloca [2 x <8 x float>], align 16
+ %r = getelementptr [2 x <8 x float>]* %incarray, i32 0, i32 0
+ %rb = getelementptr [2 x <8 x float>]* %incarrayb, i32 0, i32 0
+ %r3 = load <8 x float>* %r, align 8
+ %r4 = load <8 x float>* %rb, align 8
+ %r11 = shufflevector <8 x float> %r3, <8 x float> %r4, <8 x i32> < i32 0, i32 8, i32 1, i32 9, i32 4, i32 12, i32 5, i32 13 > ; <<8 x float>> [#uses=1]
+; CHECK: vunpcklps
+ %r12 = getelementptr [2 x <8 x float>]* %carray, i32 0, i32 1
+ store <8 x float> %r11, <8 x float>* %r12, align 4
+ ret void
+}
diff --git a/test/CodeGen/X86/abi-isel.ll b/test/CodeGen/X86/abi-isel.ll
index 5b4d79fa22b9..7535e07b809c 100644
--- a/test/CodeGen/X86/abi-isel.ll
+++ b/test/CodeGen/X86/abi-isel.ll
@@ -12,6 +12,17 @@
; RUN: llc < %s -asm-verbose=0 -mtriple=x86_64-apple-darwin -march=x86-64 -relocation-model=dynamic-no-pic -code-model=small | FileCheck %s -check-prefix=DARWIN-64-DYNAMIC
; RUN: llc < %s -asm-verbose=0 -mtriple=x86_64-apple-darwin -march=x86-64 -relocation-model=pic -code-model=small | FileCheck %s -check-prefix=DARWIN-64-PIC
+; RUN: llc < %s -asm-verbose=0 -regalloc=basic -mtriple=i686-unknown-linux-gnu -march=x86 -relocation-model=static -code-model=small | FileCheck %s -check-prefix=LINUX-32-STATIC
+; RUN: llc < %s -asm-verbose=0 -regalloc=basic -mtriple=i686-unknown-linux-gnu -march=x86 -relocation-model=static -code-model=small | FileCheck %s -check-prefix=LINUX-32-PIC
+; RUN: llc < %s -asm-verbose=0 -regalloc=basic -mtriple=x86_64-unknown-linux-gnu -march=x86-64 -relocation-model=static -code-model=small | FileCheck %s -check-prefix=LINUX-64-STATIC
+; RUN: llc < %s -asm-verbose=0 -regalloc=basic -mtriple=x86_64-unknown-linux-gnu -march=x86-64 -relocation-model=pic -code-model=small | FileCheck %s -check-prefix=LINUX-64-PIC
+; RUN: llc < %s -asm-verbose=0 -regalloc=basic -mtriple=i686-apple-darwin -march=x86 -relocation-model=static -code-model=small | FileCheck %s -check-prefix=DARWIN-32-STATIC
+; RUN: llc < %s -asm-verbose=0 -regalloc=basic -mtriple=i686-apple-darwin -march=x86 -relocation-model=dynamic-no-pic -code-model=small | FileCheck %s -check-prefix=DARWIN-32-DYNAMIC
+; RUN: llc < %s -asm-verbose=0 -regalloc=basic -mtriple=i686-apple-darwin -march=x86 -relocation-model=pic -code-model=small | FileCheck %s -check-prefix=DARWIN-32-PIC
+; RUN: llc < %s -asm-verbose=0 -regalloc=basic -mtriple=x86_64-apple-darwin -march=x86-64 -relocation-model=static -code-model=small | FileCheck %s -check-prefix=DARWIN-64-STATIC
+; RUN: llc < %s -asm-verbose=0 -regalloc=basic -mtriple=x86_64-apple-darwin -march=x86-64 -relocation-model=dynamic-no-pic -code-model=small | FileCheck %s -check-prefix=DARWIN-64-DYNAMIC
+; RUN: llc < %s -asm-verbose=0 -regalloc=basic -mtriple=x86_64-apple-darwin -march=x86-64 -relocation-model=pic -code-model=small | FileCheck %s -check-prefix=DARWIN-64-PIC
+
@src = external global [131072 x i32]
@dst = external global [131072 x i32]
@xsrc = external global [32 x i32]
@@ -38,68 +49,68 @@ entry:
ret void
; LINUX-64-STATIC: foo00:
-; LINUX-64-STATIC: movl src(%rip), %eax
-; LINUX-64-STATIC: movl %eax, dst
+; LINUX-64-STATIC: movl src(%rip), [[EAX:%e.x]]
+; LINUX-64-STATIC: movl [[EAX]], dst
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: foo00:
-; LINUX-32-STATIC: movl src, %eax
-; LINUX-32-STATIC-NEXT: movl %eax, dst
+; LINUX-32-STATIC: movl src, [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[EAX]], dst
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: foo00:
-; LINUX-32-PIC: movl src, %eax
-; LINUX-32-PIC-NEXT: movl %eax, dst
+; LINUX-32-PIC: movl src, [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[EAX]], dst
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: foo00:
-; LINUX-64-PIC: movq src@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: movl (%rax), %eax
-; LINUX-64-PIC-NEXT: movq dst@GOTPCREL(%rip), %rcx
-; LINUX-64-PIC-NEXT: movl %eax, (%rcx)
+; LINUX-64-PIC: movq src@GOTPCREL(%rip), [[RAX:%r..]]
+; LINUX-64-PIC-NEXT: movl ([[RAX]]), [[EAX:%e..]]
+; LINUX-64-PIC-NEXT: movq dst@GOTPCREL(%rip), [[RCX:%r..]]
+; LINUX-64-PIC-NEXT: movl [[EAX]], ([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _foo00:
-; DARWIN-32-STATIC: movl _src, %eax
-; DARWIN-32-STATIC-NEXT: movl %eax, _dst
+; DARWIN-32-STATIC: movl _src, [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[EAX]], _dst
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _foo00:
-; DARWIN-32-DYNAMIC: movl L_src$non_lazy_ptr, %eax
-; DARWIN-32-DYNAMIC-NEXT: movl (%eax), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl L_dst$non_lazy_ptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl %eax, (%ecx)
+; DARWIN-32-DYNAMIC: movl L_src$non_lazy_ptr, [[EAX:%e..]]
+; DARWIN-32-DYNAMIC-NEXT: movl ([[EAX]]), [[EAX:%e..]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_dst$non_lazy_ptr, [[ECX:%e..]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], ([[ECX]])
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _foo00:
; DARWIN-32-PIC: calll L0$pb
; DARWIN-32-PIC-NEXT: L0$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L0$pb(%eax), %ecx
-; DARWIN-32-PIC-NEXT: movl (%ecx), %ecx
-; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L0$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: movl %ecx, (%eax)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e..]]
+; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L0$pb([[EAX]]), [[ECX:%e..]]
+; DARWIN-32-PIC-NEXT: movl ([[ECX]]), [[ECX:%e..]]
+; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L0$pb([[EAX]]), [[EAX:%e..]]
+; DARWIN-32-PIC-NEXT: movl [[ECX]], ([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _foo00:
-; DARWIN-64-STATIC: movq _src@GOTPCREL(%rip), %rax
-; DARWIN-64-STATIC-NEXT: movl (%rax), %eax
-; DARWIN-64-STATIC-NEXT: movq _dst@GOTPCREL(%rip), %rcx
-; DARWIN-64-STATIC-NEXT: movl %eax, (%rcx)
+; DARWIN-64-STATIC: movq _src@GOTPCREL(%rip), [[RAX:%r..]]
+; DARWIN-64-STATIC-NEXT: movl ([[RAX]]), [[EAX:%e..]]
+; DARWIN-64-STATIC-NEXT: movq _dst@GOTPCREL(%rip), [[RCX:%r..]]
+; DARWIN-64-STATIC-NEXT: movl [[EAX]], ([[RCX]])
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _foo00:
-; DARWIN-64-DYNAMIC: movq _src@GOTPCREL(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: movl (%rax), %eax
-; DARWIN-64-DYNAMIC-NEXT: movq _dst@GOTPCREL(%rip), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movl %eax, (%rcx)
+; DARWIN-64-DYNAMIC: movq _src@GOTPCREL(%rip), [[RAX:%r..]]
+; DARWIN-64-DYNAMIC-NEXT: movl ([[RAX]]), [[EAX:%e..]]
+; DARWIN-64-DYNAMIC-NEXT: movq _dst@GOTPCREL(%rip), [[RCX:%r..]]
+; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], ([[RCX]])
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _foo00:
-; DARWIN-64-PIC: movq _src@GOTPCREL(%rip), %rax
-; DARWIN-64-PIC-NEXT: movl (%rax), %eax
-; DARWIN-64-PIC-NEXT: movq _dst@GOTPCREL(%rip), %rcx
-; DARWIN-64-PIC-NEXT: movl %eax, (%rcx)
+; DARWIN-64-PIC: movq _src@GOTPCREL(%rip), [[RAX:%r..]]
+; DARWIN-64-PIC-NEXT: movl ([[RAX]]), [[EAX:%e..]]
+; DARWIN-64-PIC-NEXT: movq _dst@GOTPCREL(%rip), [[RCX:%r..]]
+; DARWIN-64-PIC-NEXT: movl [[EAX]], ([[RCX]])
; DARWIN-64-PIC-NEXT: ret
}
@@ -110,68 +121,68 @@ entry:
ret void
; LINUX-64-STATIC: fxo00:
-; LINUX-64-STATIC: movl xsrc(%rip), %eax
-; LINUX-64-STATIC: movl %eax, xdst
+; LINUX-64-STATIC: movl xsrc(%rip), [[EAX:%e.x]]
+; LINUX-64-STATIC: movl [[EAX]], xdst
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: fxo00:
-; LINUX-32-STATIC: movl xsrc, %eax
-; LINUX-32-STATIC-NEXT: movl %eax, xdst
+; LINUX-32-STATIC: movl xsrc, [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[EAX]], xdst
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: fxo00:
-; LINUX-32-PIC: movl xsrc, %eax
-; LINUX-32-PIC-NEXT: movl %eax, xdst
+; LINUX-32-PIC: movl xsrc, [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[EAX]], xdst
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: fxo00:
-; LINUX-64-PIC: movq xsrc@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: movl (%rax), %eax
-; LINUX-64-PIC-NEXT: movq xdst@GOTPCREL(%rip), %rcx
-; LINUX-64-PIC-NEXT: movl %eax, (%rcx)
+; LINUX-64-PIC: movq xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movl ([[RAX]]), [[EAX:%e.x]]
+; LINUX-64-PIC-NEXT: movq xdst@GOTPCREL(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movl [[EAX]], ([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _fxo00:
-; DARWIN-32-STATIC: movl _xsrc, %eax
-; DARWIN-32-STATIC-NEXT: movl %eax, _xdst
+; DARWIN-32-STATIC: movl _xsrc, [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[EAX]], _xdst
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _fxo00:
-; DARWIN-32-DYNAMIC: movl L_xsrc$non_lazy_ptr, %eax
-; DARWIN-32-DYNAMIC-NEXT: movl (%eax), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl L_xdst$non_lazy_ptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl %eax, (%ecx)
+; DARWIN-32-DYNAMIC: movl L_xsrc$non_lazy_ptr, [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl ([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_xdst$non_lazy_ptr, [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], ([[ECX]])
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _fxo00:
; DARWIN-32-PIC: calll L1$pb
; DARWIN-32-PIC-NEXT: L1$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L1$pb(%eax), %ecx
-; DARWIN-32-PIC-NEXT: movl (%ecx), %ecx
-; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L1$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: movl %ecx, (%eax)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L1$pb([[EAX]]), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl ([[ECX]]), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L1$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[ECX]], ([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _fxo00:
-; DARWIN-64-STATIC: movq _xsrc@GOTPCREL(%rip), %rax
-; DARWIN-64-STATIC-NEXT: movl (%rax), %eax
-; DARWIN-64-STATIC-NEXT: movq _xdst@GOTPCREL(%rip), %rcx
-; DARWIN-64-STATIC-NEXT: movl %eax, (%rcx)
+; DARWIN-64-STATIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl ([[RAX]]), [[EAX:%e.x]]
+; DARWIN-64-STATIC-NEXT: movq _xdst@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl [[EAX]], ([[RCX]])
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _fxo00:
-; DARWIN-64-DYNAMIC: movq _xsrc@GOTPCREL(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: movl (%rax), %eax
-; DARWIN-64-DYNAMIC-NEXT: movq _xdst@GOTPCREL(%rip), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movl %eax, (%rcx)
+; DARWIN-64-DYNAMIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl ([[RAX]]), [[EAX:%e.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq _xdst@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], ([[RCX]])
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _fxo00:
-; DARWIN-64-PIC: movq _xsrc@GOTPCREL(%rip), %rax
-; DARWIN-64-PIC-NEXT: movl (%rax), %eax
-; DARWIN-64-PIC-NEXT: movq _xdst@GOTPCREL(%rip), %rcx
-; DARWIN-64-PIC-NEXT: movl %eax, (%rcx)
+; DARWIN-64-PIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl ([[RAX]]), [[EAX:%e.x]]
+; DARWIN-64-PIC-NEXT: movq _xdst@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl [[EAX]], ([[RCX]])
; DARWIN-64-PIC-NEXT: ret
}
@@ -192,9 +203,9 @@ entry:
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: foo01:
-; LINUX-64-PIC: movq dst@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), %rcx
-; LINUX-64-PIC-NEXT: movq %rax, (%rcx)
+; LINUX-64-PIC: movq dst@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movq [[RAX]], ([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _foo01:
@@ -202,36 +213,36 @@ entry:
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _foo01:
-; DARWIN-32-DYNAMIC: movl L_dst$non_lazy_ptr, %eax
-; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl %eax, (%ecx)
+; DARWIN-32-DYNAMIC: movl L_dst$non_lazy_ptr, [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], ([[ECX]])
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _foo01:
; DARWIN-32-PIC: calll L2$pb
; DARWIN-32-PIC-NEXT: L2$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L2$pb(%eax), %ecx
-; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L2$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: movl %ecx, (%eax)
+; DARWIN-32-PIC-NEXT: popl
+; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L2$pb(
+; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L2$pb(
+; DARWIN-32-PIC-NEXT: movl
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _foo01:
-; DARWIN-64-STATIC: movq _dst@GOTPCREL(%rip), %rax
-; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-STATIC-NEXT: movq %rax, (%rcx)
+; DARWIN-64-STATIC: movq _dst@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movq [[RAX]], ([[RCX]])
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _foo01:
-; DARWIN-64-DYNAMIC: movq _dst@GOTPCREL(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movq %rax, (%rcx)
+; DARWIN-64-DYNAMIC: movq _dst@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], ([[RCX]])
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _foo01:
-; DARWIN-64-PIC: movq _dst@GOTPCREL(%rip), %rax
-; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-PIC-NEXT: movq %rax, (%rcx)
+; DARWIN-64-PIC: movq _dst@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movq [[RAX]], ([[RCX]])
; DARWIN-64-PIC-NEXT: ret
}
@@ -252,9 +263,9 @@ entry:
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: fxo01:
-; LINUX-64-PIC: movq xdst@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), %rcx
-; LINUX-64-PIC-NEXT: movq %rax, (%rcx)
+; LINUX-64-PIC: movq xdst@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movq [[RAX]], ([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _fxo01:
@@ -262,36 +273,36 @@ entry:
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _fxo01:
-; DARWIN-32-DYNAMIC: movl L_xdst$non_lazy_ptr, %eax
-; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl %eax, (%ecx)
+; DARWIN-32-DYNAMIC: movl L_xdst$non_lazy_ptr, [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], ([[ECX]])
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _fxo01:
; DARWIN-32-PIC: calll L3$pb
; DARWIN-32-PIC-NEXT: L3$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L3$pb(%eax), %ecx
-; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L3$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: movl %ecx, (%eax)
+; DARWIN-32-PIC-NEXT: popl [[R0:%e..]]
+; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L3$pb([[R0]]), [[R1:%e..]]
+; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L3$pb([[R0]]), [[R2:%e..]]
+; DARWIN-32-PIC-NEXT: movl [[R1:%e..]], ([[R2]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _fxo01:
-; DARWIN-64-STATIC: movq _xdst@GOTPCREL(%rip), %rax
-; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-STATIC-NEXT: movq %rax, (%rcx)
+; DARWIN-64-STATIC: movq _xdst@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movq [[RAX]], ([[RCX]])
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _fxo01:
-; DARWIN-64-DYNAMIC: movq _xdst@GOTPCREL(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movq %rax, (%rcx)
+; DARWIN-64-DYNAMIC: movq _xdst@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], ([[RCX]])
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _fxo01:
-; DARWIN-64-PIC: movq _xdst@GOTPCREL(%rip), %rax
-; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-PIC-NEXT: movq %rax, (%rcx)
+; DARWIN-64-PIC: movq _xdst@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movq [[RAX]], ([[RCX]])
; DARWIN-64-PIC-NEXT: ret
}
@@ -308,72 +319,72 @@ entry:
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: foo02:
-; LINUX-32-STATIC: movl src, %eax
-; LINUX-32-STATIC-NEXT: movl ptr, %ecx
-; LINUX-32-STATIC-NEXT: movl %eax, (%ecx)
+; LINUX-32-STATIC: movl src, [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl ptr, [[ECX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[EAX]], ([[ECX]])
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: foo02:
-; LINUX-32-PIC: movl src, %eax
-; LINUX-32-PIC-NEXT: movl ptr, %ecx
-; LINUX-32-PIC-NEXT: movl %eax, (%ecx)
+; LINUX-32-PIC: movl src, [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl ptr, [[ECX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[EAX]], ([[ECX]])
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: foo02:
-; LINUX-64-PIC: movq src@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: movl (%rax), %eax
-; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), %rcx
-; LINUX-64-PIC-NEXT: movq (%rcx), %rcx
-; LINUX-64-PIC-NEXT: movl %eax, (%rcx)
+; LINUX-64-PIC: movq src@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movl ([[RAX]]), [[EAX:%e.x]]
+; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movl [[EAX]], ([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _foo02:
-; DARWIN-32-STATIC: movl _src, %eax
-; DARWIN-32-STATIC-NEXT: movl _ptr, %ecx
-; DARWIN-32-STATIC-NEXT: movl %eax, (%ecx)
+; DARWIN-32-STATIC: movl _src, [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl _ptr, [[ECX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[EAX]], ([[ECX]])
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _foo02:
-; DARWIN-32-DYNAMIC: movl L_src$non_lazy_ptr, %eax
-; DARWIN-32-DYNAMIC-NEXT: movl (%eax), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl (%ecx), %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl %eax, (%ecx)
+; DARWIN-32-DYNAMIC: movl L_src$non_lazy_ptr, [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl ([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl ([[ECX]]), [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], ([[ECX]])
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _foo02:
; DARWIN-32-PIC: calll L4$pb
; DARWIN-32-PIC-NEXT: L4$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L4$pb(%eax), %ecx
-; DARWIN-32-PIC-NEXT: movl (%ecx), %ecx
-; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L4$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: movl (%eax), %eax
-; DARWIN-32-PIC-NEXT: movl %ecx, (%eax)
+; DARWIN-32-PIC-NEXT: popl [[R0:%e..]]
+; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L4$pb([[R0]]), [[R1:%e..]]
+; DARWIN-32-PIC-NEXT: movl ([[R1]]), [[R2:%e..]]
+; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L4$pb([[R0]]), [[R3:%e..]]
+; DARWIN-32-PIC-NEXT: movl ([[R3]]), [[R4:%e..]]
+; DARWIN-32-PIC-NEXT: movl [[R2]], ([[R4]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _foo02:
-; DARWIN-64-STATIC: movq _src@GOTPCREL(%rip), %rax
-; DARWIN-64-STATIC-NEXT: movl (%rax), %eax
-; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-STATIC-NEXT: movq (%rcx), %rcx
-; DARWIN-64-STATIC-NEXT: movl %eax, (%rcx)
+; DARWIN-64-STATIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl ([[RAX]]), [[EAX:%e.x]]
+; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl [[EAX]], ([[RCX]])
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _foo02:
-; DARWIN-64-DYNAMIC: movq _src@GOTPCREL(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: movl (%rax), %eax
-; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movq (%rcx), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movl %eax, (%rcx)
+; DARWIN-64-DYNAMIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl ([[RAX]]), [[EAX:%e.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], ([[RCX]])
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _foo02:
-; DARWIN-64-PIC: movq _src@GOTPCREL(%rip), %rax
-; DARWIN-64-PIC-NEXT: movl (%rax), %eax
-; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-PIC-NEXT: movq (%rcx), %rcx
-; DARWIN-64-PIC-NEXT: movl %eax, (%rcx)
+; DARWIN-64-PIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl ([[RAX]]), [[EAX:%e.x]]
+; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl [[EAX]], ([[RCX]])
; DARWIN-64-PIC-NEXT: ret
}
@@ -389,73 +400,73 @@ entry:
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: fxo02:
-; LINUX-32-STATIC: movl xsrc, %eax
-; LINUX-32-STATIC-NEXT: movl ptr, %ecx
-; LINUX-32-STATIC-NEXT: movl %eax, (%ecx)
+; LINUX-32-STATIC: movl xsrc, [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl ptr, [[ECX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[EAX]], ([[ECX]])
; LINUX-32-STATIC-NEXT: ret
ret void
; LINUX-32-PIC: fxo02:
-; LINUX-32-PIC: movl xsrc, %eax
-; LINUX-32-PIC-NEXT: movl ptr, %ecx
-; LINUX-32-PIC-NEXT: movl %eax, (%ecx)
+; LINUX-32-PIC: movl xsrc, [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl ptr, [[ECX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[EAX]], ([[ECX]])
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: fxo02:
-; LINUX-64-PIC: movq xsrc@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: movl (%rax), %eax
-; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), %rcx
-; LINUX-64-PIC-NEXT: movq (%rcx), %rcx
-; LINUX-64-PIC-NEXT: movl %eax, (%rcx)
+; LINUX-64-PIC: movq xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movl ([[RAX]]), [[EAX:%e.x]]
+; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movl [[EAX]], ([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _fxo02:
-; DARWIN-32-STATIC: movl _xsrc, %eax
-; DARWIN-32-STATIC-NEXT: movl _ptr, %ecx
-; DARWIN-32-STATIC-NEXT: movl %eax, (%ecx)
+; DARWIN-32-STATIC: movl _xsrc, [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl _ptr, [[ECX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[EAX]], ([[ECX]])
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _fxo02:
-; DARWIN-32-DYNAMIC: movl L_xsrc$non_lazy_ptr, %eax
-; DARWIN-32-DYNAMIC-NEXT: movl (%eax), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl (%ecx), %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl %eax, (%ecx)
+; DARWIN-32-DYNAMIC: movl L_xsrc$non_lazy_ptr, [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl ([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl ([[ECX]]), [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], ([[ECX]])
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _fxo02:
; DARWIN-32-PIC: calll L5$pb
; DARWIN-32-PIC-NEXT: L5$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L5$pb(%eax), %ecx
-; DARWIN-32-PIC-NEXT: movl (%ecx), %ecx
-; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L5$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: movl (%eax), %eax
-; DARWIN-32-PIC-NEXT: movl %ecx, (%eax)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L5$pb([[EAX]]), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl ([[ECX]]), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L5$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl ([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[ECX]], ([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _fxo02:
-; DARWIN-64-STATIC: movq _xsrc@GOTPCREL(%rip), %rax
-; DARWIN-64-STATIC-NEXT: movl (%rax), %eax
-; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-STATIC-NEXT: movq (%rcx), %rcx
-; DARWIN-64-STATIC-NEXT: movl %eax, (%rcx)
+; DARWIN-64-STATIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl ([[RAX]]), [[EAX:%e.x]]
+; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl [[EAX]], ([[RCX]])
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _fxo02:
-; DARWIN-64-DYNAMIC: movq _xsrc@GOTPCREL(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: movl (%rax), %eax
-; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movq (%rcx), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movl %eax, (%rcx)
+; DARWIN-64-DYNAMIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl ([[RAX]]), [[EAX:%e.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], ([[RCX]])
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _fxo02:
-; DARWIN-64-PIC: movq _xsrc@GOTPCREL(%rip), %rax
-; DARWIN-64-PIC-NEXT: movl (%rax), %eax
-; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-PIC-NEXT: movq (%rcx), %rcx
-; DARWIN-64-PIC-NEXT: movl %eax, (%rcx)
+; DARWIN-64-PIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl ([[RAX]]), [[EAX:%e.x]]
+; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl [[EAX]], ([[RCX]])
; DARWIN-64-PIC-NEXT: ret
}
@@ -465,58 +476,58 @@ entry:
store i32 %0, i32* getelementptr ([131072 x i32]* @ddst, i32 0, i64 0), align 32
ret void
; LINUX-64-STATIC: foo03:
-; LINUX-64-STATIC: movl dsrc(%rip), %eax
-; LINUX-64-STATIC: movl %eax, ddst
+; LINUX-64-STATIC: movl dsrc(%rip), [[EAX:%e.x]]
+; LINUX-64-STATIC: movl [[EAX]], ddst
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: foo03:
-; LINUX-32-STATIC: movl dsrc, %eax
-; LINUX-32-STATIC-NEXT: movl %eax, ddst
+; LINUX-32-STATIC: movl dsrc, [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[EAX]], ddst
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: foo03:
-; LINUX-32-PIC: movl dsrc, %eax
-; LINUX-32-PIC-NEXT: movl %eax, ddst
+; LINUX-32-PIC: movl dsrc, [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[EAX]], ddst
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: foo03:
-; LINUX-64-PIC: movq dsrc@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: movl (%rax), %eax
-; LINUX-64-PIC-NEXT: movq ddst@GOTPCREL(%rip), %rcx
-; LINUX-64-PIC-NEXT: movl %eax, (%rcx)
+; LINUX-64-PIC: movq dsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movl ([[RAX]]), [[EAX:%e.x]]
+; LINUX-64-PIC-NEXT: movq ddst@GOTPCREL(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movl [[EAX]], ([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _foo03:
-; DARWIN-32-STATIC: movl _dsrc, %eax
-; DARWIN-32-STATIC-NEXT: movl %eax, _ddst
+; DARWIN-32-STATIC: movl _dsrc, [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[EAX]], _ddst
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _foo03:
-; DARWIN-32-DYNAMIC: movl _dsrc, %eax
-; DARWIN-32-DYNAMIC-NEXT: movl %eax, _ddst
+; DARWIN-32-DYNAMIC: movl _dsrc, [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], _ddst
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _foo03:
; DARWIN-32-PIC: calll L6$pb
; DARWIN-32-PIC-NEXT: L6$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl _dsrc-L6$pb(%eax), %ecx
-; DARWIN-32-PIC-NEXT: movl %ecx, _ddst-L6$pb(%eax)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl _dsrc-L6$pb([[EAX]]), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[ECX]], _ddst-L6$pb([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _foo03:
-; DARWIN-64-STATIC: movl _dsrc(%rip), %eax
-; DARWIN-64-STATIC-NEXT: movl %eax, _ddst(%rip)
+; DARWIN-64-STATIC: movl _dsrc(%rip), [[EAX:%e.x]]
+; DARWIN-64-STATIC-NEXT: movl [[EAX]], _ddst(%rip)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _foo03:
-; DARWIN-64-DYNAMIC: movl _dsrc(%rip), %eax
-; DARWIN-64-DYNAMIC-NEXT: movl %eax, _ddst(%rip)
+; DARWIN-64-DYNAMIC: movl _dsrc(%rip), [[EAX:%e.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], _ddst(%rip)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _foo03:
-; DARWIN-64-PIC: movl _dsrc(%rip), %eax
-; DARWIN-64-PIC-NEXT: movl %eax, _ddst(%rip)
+; DARWIN-64-PIC: movl _dsrc(%rip), [[EAX:%e.x]]
+; DARWIN-64-PIC-NEXT: movl [[EAX]], _ddst(%rip)
; DARWIN-64-PIC-NEXT: ret
}
@@ -537,9 +548,9 @@ entry:
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: foo04:
-; LINUX-64-PIC: movq ddst@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: movq dptr@GOTPCREL(%rip), %rcx
-; LINUX-64-PIC-NEXT: movq %rax, (%rcx)
+; LINUX-64-PIC: movq ddst@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movq dptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movq [[RAX]], ([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _foo04:
@@ -553,24 +564,24 @@ entry:
; DARWIN-32-PIC: _foo04:
; DARWIN-32-PIC: calll L7$pb
; DARWIN-32-PIC-NEXT: L7$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: leal _ddst-L7$pb(%eax), %ecx
-; DARWIN-32-PIC-NEXT: movl %ecx, _dptr-L7$pb(%eax)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal _ddst-L7$pb([[EAX]]), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[ECX]], _dptr-L7$pb([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _foo04:
-; DARWIN-64-STATIC: leaq _ddst(%rip), %rax
-; DARWIN-64-STATIC-NEXT: movq %rax, _dptr(%rip)
+; DARWIN-64-STATIC: leaq _ddst(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movq [[RAX]], _dptr(%rip)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _foo04:
-; DARWIN-64-DYNAMIC: leaq _ddst(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: movq %rax, _dptr(%rip)
+; DARWIN-64-DYNAMIC: leaq _ddst(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], _dptr(%rip)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _foo04:
-; DARWIN-64-PIC: leaq _ddst(%rip), %rax
-; DARWIN-64-PIC-NEXT: movq %rax, _dptr(%rip)
+; DARWIN-64-PIC: leaq _ddst(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movq [[RAX]], _dptr(%rip)
; DARWIN-64-PIC-NEXT: ret
}
@@ -587,62 +598,62 @@ entry:
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: foo05:
-; LINUX-32-STATIC: movl dsrc, %eax
-; LINUX-32-STATIC-NEXT: movl dptr, %ecx
-; LINUX-32-STATIC-NEXT: movl %eax, (%ecx)
+; LINUX-32-STATIC: movl dsrc, [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl dptr, [[ECX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[EAX]], ([[ECX]])
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: foo05:
-; LINUX-32-PIC: movl dsrc, %eax
-; LINUX-32-PIC-NEXT: movl dptr, %ecx
-; LINUX-32-PIC-NEXT: movl %eax, (%ecx)
+; LINUX-32-PIC: movl dsrc, [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl dptr, [[ECX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[EAX]], ([[ECX]])
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: foo05:
-; LINUX-64-PIC: movq dsrc@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: movl (%rax), %eax
-; LINUX-64-PIC-NEXT: movq dptr@GOTPCREL(%rip), %rcx
-; LINUX-64-PIC-NEXT: movq (%rcx), %rcx
-; LINUX-64-PIC-NEXT: movl %eax, (%rcx)
+; LINUX-64-PIC: movq dsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movl ([[RAX]]), [[EAX:%e.x]]
+; LINUX-64-PIC-NEXT: movq dptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movl [[EAX]], ([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _foo05:
-; DARWIN-32-STATIC: movl _dsrc, %eax
-; DARWIN-32-STATIC-NEXT: movl _dptr, %ecx
-; DARWIN-32-STATIC-NEXT: movl %eax, (%ecx)
+; DARWIN-32-STATIC: movl _dsrc, [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl _dptr, [[ECX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[EAX]], ([[ECX]])
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _foo05:
-; DARWIN-32-DYNAMIC: movl _dsrc, %eax
-; DARWIN-32-DYNAMIC-NEXT: movl _dptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl %eax, (%ecx)
+; DARWIN-32-DYNAMIC: movl _dsrc, [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl _dptr, [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], ([[ECX]])
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _foo05:
; DARWIN-32-PIC: calll L8$pb
; DARWIN-32-PIC-NEXT: L8$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl _dsrc-L8$pb(%eax), %ecx
-; DARWIN-32-PIC-NEXT: movl _dptr-L8$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: movl %ecx, (%eax)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl _dsrc-L8$pb([[EAX]]), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl _dptr-L8$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[ECX]], ([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _foo05:
-; DARWIN-64-STATIC: movl _dsrc(%rip), %eax
-; DARWIN-64-STATIC-NEXT: movq _dptr(%rip), %rcx
-; DARWIN-64-STATIC-NEXT: movl %eax, (%rcx)
+; DARWIN-64-STATIC: movl _dsrc(%rip), [[EAX:%e.x]]
+; DARWIN-64-STATIC-NEXT: movq _dptr(%rip), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl [[EAX]], ([[RCX]])
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _foo05:
-; DARWIN-64-DYNAMIC: movl _dsrc(%rip), %eax
-; DARWIN-64-DYNAMIC-NEXT: movq _dptr(%rip), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movl %eax, (%rcx)
+; DARWIN-64-DYNAMIC: movl _dsrc(%rip), [[EAX:%e.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq _dptr(%rip), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], ([[RCX]])
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _foo05:
-; DARWIN-64-PIC: movl _dsrc(%rip), %eax
-; DARWIN-64-PIC-NEXT: movq _dptr(%rip), %rcx
-; DARWIN-64-PIC-NEXT: movl %eax, (%rcx)
+; DARWIN-64-PIC: movl _dsrc(%rip), [[EAX:%e.x]]
+; DARWIN-64-PIC-NEXT: movq _dptr(%rip), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl [[EAX]], ([[RCX]])
; DARWIN-64-PIC-NEXT: ret
}
@@ -652,56 +663,56 @@ entry:
store i32 %0, i32* getelementptr ([131072 x i32]* @ldst, i32 0, i64 0), align 4
ret void
; LINUX-64-STATIC: foo06:
-; LINUX-64-STATIC: movl lsrc(%rip), %eax
-; LINUX-64-STATIC: movl %eax, ldst(%rip)
+; LINUX-64-STATIC: movl lsrc(%rip), [[EAX:%e.x]]
+; LINUX-64-STATIC: movl [[EAX]], ldst(%rip)
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: foo06:
-; LINUX-32-STATIC: movl lsrc, %eax
-; LINUX-32-STATIC-NEXT: movl %eax, ldst
+; LINUX-32-STATIC: movl lsrc, [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[EAX]], ldst
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: foo06:
-; LINUX-32-PIC: movl lsrc, %eax
-; LINUX-32-PIC-NEXT: movl %eax, ldst
+; LINUX-32-PIC: movl lsrc, [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[EAX]], ldst
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: foo06:
-; LINUX-64-PIC: movl lsrc(%rip), %eax
-; LINUX-64-PIC-NEXT: movl %eax, ldst(%rip)
+; LINUX-64-PIC: movl lsrc(%rip), [[EAX:%e.x]]
+; LINUX-64-PIC-NEXT: movl [[EAX]], ldst(%rip)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _foo06:
-; DARWIN-32-STATIC: movl _lsrc, %eax
-; DARWIN-32-STATIC-NEXT: movl %eax, _ldst
+; DARWIN-32-STATIC: movl _lsrc, [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[EAX]], _ldst
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _foo06:
-; DARWIN-32-DYNAMIC: movl _lsrc, %eax
-; DARWIN-32-DYNAMIC-NEXT: movl %eax, _ldst
+; DARWIN-32-DYNAMIC: movl _lsrc, [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], _ldst
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _foo06:
; DARWIN-32-PIC: calll L9$pb
; DARWIN-32-PIC-NEXT: L9$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl _lsrc-L9$pb(%eax), %ecx
-; DARWIN-32-PIC-NEXT: movl %ecx, _ldst-L9$pb(%eax)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl _lsrc-L9$pb([[EAX]]), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[ECX]], _ldst-L9$pb([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _foo06:
-; DARWIN-64-STATIC: movl _lsrc(%rip), %eax
-; DARWIN-64-STATIC-NEXT: movl %eax, _ldst(%rip)
+; DARWIN-64-STATIC: movl _lsrc(%rip), [[EAX:%e.x]]
+; DARWIN-64-STATIC-NEXT: movl [[EAX]], _ldst(%rip)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _foo06:
-; DARWIN-64-DYNAMIC: movl _lsrc(%rip), %eax
-; DARWIN-64-DYNAMIC-NEXT: movl %eax, _ldst(%rip)
+; DARWIN-64-DYNAMIC: movl _lsrc(%rip), [[EAX:%e.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], _ldst(%rip)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _foo06:
-; DARWIN-64-PIC: movl _lsrc(%rip), %eax
-; DARWIN-64-PIC-NEXT: movl %eax, _ldst(%rip)
+; DARWIN-64-PIC: movl _lsrc(%rip), [[EAX:%e.x]]
+; DARWIN-64-PIC-NEXT: movl [[EAX]], _ldst(%rip)
; DARWIN-64-PIC-NEXT: ret
}
@@ -722,8 +733,8 @@ entry:
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: foo07:
-; LINUX-64-PIC: leaq ldst(%rip), %rax
-; LINUX-64-PIC-NEXT: movq %rax, lptr(%rip)
+; LINUX-64-PIC: leaq ldst(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movq [[RAX]], lptr(%rip)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _foo07:
@@ -737,24 +748,24 @@ entry:
; DARWIN-32-PIC: _foo07:
; DARWIN-32-PIC: calll L10$pb
; DARWIN-32-PIC-NEXT: L10$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: leal _ldst-L10$pb(%eax), %ecx
-; DARWIN-32-PIC-NEXT: movl %ecx, _lptr-L10$pb(%eax)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal _ldst-L10$pb([[EAX]]), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[ECX]], _lptr-L10$pb([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _foo07:
-; DARWIN-64-STATIC: leaq _ldst(%rip), %rax
-; DARWIN-64-STATIC-NEXT: movq %rax, _lptr(%rip)
+; DARWIN-64-STATIC: leaq _ldst(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movq [[RAX]], _lptr(%rip)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _foo07:
-; DARWIN-64-DYNAMIC: leaq _ldst(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: movq %rax, _lptr(%rip)
+; DARWIN-64-DYNAMIC: leaq _ldst(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], _lptr(%rip)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _foo07:
-; DARWIN-64-PIC: leaq _ldst(%rip), %rax
-; DARWIN-64-PIC-NEXT: movq %rax, _lptr(%rip)
+; DARWIN-64-PIC: leaq _ldst(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movq [[RAX]], _lptr(%rip)
; DARWIN-64-PIC-NEXT: ret
}
@@ -771,60 +782,60 @@ entry:
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: foo08:
-; LINUX-32-STATIC: movl lsrc, %eax
-; LINUX-32-STATIC-NEXT: movl lptr, %ecx
-; LINUX-32-STATIC-NEXT: movl %eax, (%ecx)
+; LINUX-32-STATIC: movl lsrc, [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl lptr, [[ECX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[EAX]], ([[ECX]])
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: foo08:
-; LINUX-32-PIC: movl lsrc, %eax
-; LINUX-32-PIC-NEXT: movl lptr, %ecx
-; LINUX-32-PIC-NEXT: movl %eax, (%ecx)
+; LINUX-32-PIC: movl lsrc, [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl lptr, [[ECX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[EAX]], ([[ECX]])
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: foo08:
-; LINUX-64-PIC: movl lsrc(%rip), %eax
-; LINUX-64-PIC-NEXT: movq lptr(%rip), %rcx
-; LINUX-64-PIC-NEXT: movl %eax, (%rcx)
+; LINUX-64-PIC: movl lsrc(%rip), [[EAX:%e.x]]
+; LINUX-64-PIC-NEXT: movq lptr(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movl [[EAX]], ([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _foo08:
-; DARWIN-32-STATIC: movl _lsrc, %eax
-; DARWIN-32-STATIC-NEXT: movl _lptr, %ecx
-; DARWIN-32-STATIC-NEXT: movl %eax, (%ecx)
+; DARWIN-32-STATIC: movl _lsrc, [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl _lptr, [[ECX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[EAX]], ([[ECX]])
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _foo08:
-; DARWIN-32-DYNAMIC: movl _lsrc, %eax
-; DARWIN-32-DYNAMIC-NEXT: movl _lptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl %eax, (%ecx)
+; DARWIN-32-DYNAMIC: movl _lsrc, [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl _lptr, [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], ([[ECX]])
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _foo08:
; DARWIN-32-PIC: calll L11$pb
; DARWIN-32-PIC-NEXT: L11$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl _lsrc-L11$pb(%eax), %ecx
-; DARWIN-32-PIC-NEXT: movl _lptr-L11$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: movl %ecx, (%eax)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl _lsrc-L11$pb([[EAX]]), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl _lptr-L11$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[ECX]], ([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _foo08:
-; DARWIN-64-STATIC: movl _lsrc(%rip), %eax
-; DARWIN-64-STATIC-NEXT: movq _lptr(%rip), %rcx
-; DARWIN-64-STATIC-NEXT: movl %eax, (%rcx)
+; DARWIN-64-STATIC: movl _lsrc(%rip), [[EAX:%e.x]]
+; DARWIN-64-STATIC-NEXT: movq _lptr(%rip), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl [[EAX]], ([[RCX]])
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _foo08:
-; DARWIN-64-DYNAMIC: movl _lsrc(%rip), %eax
-; DARWIN-64-DYNAMIC-NEXT: movq _lptr(%rip), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movl %eax, (%rcx)
+; DARWIN-64-DYNAMIC: movl _lsrc(%rip), [[EAX:%e.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq _lptr(%rip), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], ([[RCX]])
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _foo08:
-; DARWIN-64-PIC: movl _lsrc(%rip), %eax
-; DARWIN-64-PIC-NEXT: movq _lptr(%rip), %rcx
-; DARWIN-64-PIC-NEXT: movl %eax, (%rcx)
+; DARWIN-64-PIC: movl _lsrc(%rip), [[EAX:%e.x]]
+; DARWIN-64-PIC-NEXT: movq _lptr(%rip), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl [[EAX]], ([[RCX]])
; DARWIN-64-PIC-NEXT: ret
}
@@ -834,68 +845,68 @@ entry:
store i32 %0, i32* getelementptr ([131072 x i32]* @dst, i32 0, i64 16), align 4
ret void
; LINUX-64-STATIC: qux00:
-; LINUX-64-STATIC: movl src+64(%rip), %eax
-; LINUX-64-STATIC: movl %eax, dst+64(%rip)
+; LINUX-64-STATIC: movl src+64(%rip), [[EAX:%e.x]]
+; LINUX-64-STATIC: movl [[EAX]], dst+64(%rip)
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: qux00:
-; LINUX-32-STATIC: movl src+64, %eax
-; LINUX-32-STATIC-NEXT: movl %eax, dst+64
+; LINUX-32-STATIC: movl src+64, [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[EAX]], dst+64
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: qux00:
-; LINUX-32-PIC: movl src+64, %eax
-; LINUX-32-PIC-NEXT: movl %eax, dst+64
+; LINUX-32-PIC: movl src+64, [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[EAX]], dst+64
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: qux00:
-; LINUX-64-PIC: movq src@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: movl 64(%rax), %eax
-; LINUX-64-PIC-NEXT: movq dst@GOTPCREL(%rip), %rcx
-; LINUX-64-PIC-NEXT: movl %eax, 64(%rcx)
+; LINUX-64-PIC: movq src@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]]
+; LINUX-64-PIC-NEXT: movq dst@GOTPCREL(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movl [[EAX]], 64([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _qux00:
-; DARWIN-32-STATIC: movl _src+64, %eax
-; DARWIN-32-STATIC-NEXT: movl %eax, _dst+64
+; DARWIN-32-STATIC: movl _src+64, [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[EAX]], _dst+64
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _qux00:
-; DARWIN-32-DYNAMIC: movl L_src$non_lazy_ptr, %eax
-; DARWIN-32-DYNAMIC-NEXT: movl 64(%eax), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl L_dst$non_lazy_ptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl %eax, 64(%ecx)
+; DARWIN-32-DYNAMIC: movl L_src$non_lazy_ptr, [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl 64([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_dst$non_lazy_ptr, [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], 64([[ECX]])
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _qux00:
; DARWIN-32-PIC: calll L12$pb
; DARWIN-32-PIC-NEXT: L12$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L12$pb(%eax), %ecx
-; DARWIN-32-PIC-NEXT: movl 64(%ecx), %ecx
-; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L12$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: movl %ecx, 64(%eax)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L12$pb([[EAX]]), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 64([[ECX]]), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L12$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[ECX]], 64([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _qux00:
-; DARWIN-64-STATIC: movq _src@GOTPCREL(%rip), %rax
-; DARWIN-64-STATIC-NEXT: movl 64(%rax), %eax
-; DARWIN-64-STATIC-NEXT: movq _dst@GOTPCREL(%rip), %rcx
-; DARWIN-64-STATIC-NEXT: movl %eax, 64(%rcx)
+; DARWIN-64-STATIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]]
+; DARWIN-64-STATIC-NEXT: movq _dst@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl [[EAX]], 64([[RCX]])
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _qux00:
-; DARWIN-64-DYNAMIC: movq _src@GOTPCREL(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: movl 64(%rax), %eax
-; DARWIN-64-DYNAMIC-NEXT: movq _dst@GOTPCREL(%rip), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movl %eax, 64(%rcx)
+; DARWIN-64-DYNAMIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq _dst@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 64([[RCX]])
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _qux00:
-; DARWIN-64-PIC: movq _src@GOTPCREL(%rip), %rax
-; DARWIN-64-PIC-NEXT: movl 64(%rax), %eax
-; DARWIN-64-PIC-NEXT: movq _dst@GOTPCREL(%rip), %rcx
-; DARWIN-64-PIC-NEXT: movl %eax, 64(%rcx)
+; DARWIN-64-PIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]]
+; DARWIN-64-PIC-NEXT: movq _dst@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl [[EAX]], 64([[RCX]])
; DARWIN-64-PIC-NEXT: ret
}
@@ -905,68 +916,68 @@ entry:
store i32 %0, i32* getelementptr ([32 x i32]* @xdst, i32 0, i64 16), align 4
ret void
; LINUX-64-STATIC: qxx00:
-; LINUX-64-STATIC: movl xsrc+64(%rip), %eax
-; LINUX-64-STATIC: movl %eax, xdst+64(%rip)
+; LINUX-64-STATIC: movl xsrc+64(%rip), [[EAX:%e.x]]
+; LINUX-64-STATIC: movl [[EAX]], xdst+64(%rip)
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: qxx00:
-; LINUX-32-STATIC: movl xsrc+64, %eax
-; LINUX-32-STATIC-NEXT: movl %eax, xdst+64
+; LINUX-32-STATIC: movl xsrc+64, [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[EAX]], xdst+64
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: qxx00:
-; LINUX-32-PIC: movl xsrc+64, %eax
-; LINUX-32-PIC-NEXT: movl %eax, xdst+64
+; LINUX-32-PIC: movl xsrc+64, [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[EAX]], xdst+64
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: qxx00:
-; LINUX-64-PIC: movq xsrc@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: movl 64(%rax), %eax
-; LINUX-64-PIC-NEXT: movq xdst@GOTPCREL(%rip), %rcx
-; LINUX-64-PIC-NEXT: movl %eax, 64(%rcx)
+; LINUX-64-PIC: movq xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]]
+; LINUX-64-PIC-NEXT: movq xdst@GOTPCREL(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movl [[EAX]], 64([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _qxx00:
-; DARWIN-32-STATIC: movl _xsrc+64, %eax
-; DARWIN-32-STATIC-NEXT: movl %eax, _xdst+64
+; DARWIN-32-STATIC: movl _xsrc+64, [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[EAX]], _xdst+64
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _qxx00:
-; DARWIN-32-DYNAMIC: movl L_xsrc$non_lazy_ptr, %eax
-; DARWIN-32-DYNAMIC-NEXT: movl 64(%eax), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl L_xdst$non_lazy_ptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl %eax, 64(%ecx)
+; DARWIN-32-DYNAMIC: movl L_xsrc$non_lazy_ptr, [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl 64([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_xdst$non_lazy_ptr, [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], 64([[ECX]])
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _qxx00:
; DARWIN-32-PIC: calll L13$pb
; DARWIN-32-PIC-NEXT: L13$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L13$pb(%eax), %ecx
-; DARWIN-32-PIC-NEXT: movl 64(%ecx), %ecx
-; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L13$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: movl %ecx, 64(%eax)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L13$pb([[EAX]]), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 64([[ECX]]), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L13$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[ECX]], 64([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _qxx00:
-; DARWIN-64-STATIC: movq _xsrc@GOTPCREL(%rip), %rax
-; DARWIN-64-STATIC-NEXT: movl 64(%rax), %eax
-; DARWIN-64-STATIC-NEXT: movq _xdst@GOTPCREL(%rip), %rcx
-; DARWIN-64-STATIC-NEXT: movl %eax, 64(%rcx)
+; DARWIN-64-STATIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]]
+; DARWIN-64-STATIC-NEXT: movq _xdst@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl [[EAX]], 64([[RCX]])
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _qxx00:
-; DARWIN-64-DYNAMIC: movq _xsrc@GOTPCREL(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: movl 64(%rax), %eax
-; DARWIN-64-DYNAMIC-NEXT: movq _xdst@GOTPCREL(%rip), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movl %eax, 64(%rcx)
+; DARWIN-64-DYNAMIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq _xdst@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 64([[RCX]])
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _qxx00:
-; DARWIN-64-PIC: movq _xsrc@GOTPCREL(%rip), %rax
-; DARWIN-64-PIC-NEXT: movl 64(%rax), %eax
-; DARWIN-64-PIC-NEXT: movq _xdst@GOTPCREL(%rip), %rcx
-; DARWIN-64-PIC-NEXT: movl %eax, 64(%rcx)
+; DARWIN-64-PIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]]
+; DARWIN-64-PIC-NEXT: movq _xdst@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl [[EAX]], 64([[RCX]])
; DARWIN-64-PIC-NEXT: ret
}
@@ -987,10 +998,10 @@ entry:
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: qux01:
-; LINUX-64-PIC: movq dst@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: addq $64, %rax
-; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), %rcx
-; LINUX-64-PIC-NEXT: movq %rax, (%rcx)
+; LINUX-64-PIC: movq dst@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: addq $64, [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movq [[RAX]], ([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _qux01:
@@ -998,41 +1009,41 @@ entry:
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _qux01:
-; DARWIN-32-DYNAMIC: movl L_dst$non_lazy_ptr, %eax
-; DARWIN-32-DYNAMIC-NEXT: addl $64, %eax
-; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl %eax, (%ecx)
+; DARWIN-32-DYNAMIC: movl L_dst$non_lazy_ptr, [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: addl $64, [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], ([[ECX]])
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _qux01:
; DARWIN-32-PIC: calll L14$pb
; DARWIN-32-PIC-NEXT: L14$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L14$pb(%eax), %ecx
-; DARWIN-32-PIC-NEXT: addl $64, %ecx
-; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L14$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: movl %ecx, (%eax)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L14$pb([[EAX]]), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: addl $64, [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L14$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[ECX]], ([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _qux01:
-; DARWIN-64-STATIC: movq _dst@GOTPCREL(%rip), %rax
-; DARWIN-64-STATIC-NEXT: addq $64, %rax
-; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-STATIC-NEXT: movq %rax, (%rcx)
+; DARWIN-64-STATIC: movq _dst@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: addq $64, [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movq [[RAX]], ([[RCX]])
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _qux01:
-; DARWIN-64-DYNAMIC: movq _dst@GOTPCREL(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: addq $64, %rax
-; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movq %rax, (%rcx)
+; DARWIN-64-DYNAMIC: movq _dst@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: addq $64, [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], ([[RCX]])
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _qux01:
-; DARWIN-64-PIC: movq _dst@GOTPCREL(%rip), %rax
-; DARWIN-64-PIC-NEXT: addq $64, %rax
-; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-PIC-NEXT: movq %rax, (%rcx)
+; DARWIN-64-PIC: movq _dst@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: addq $64, [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movq [[RAX]], ([[RCX]])
; DARWIN-64-PIC-NEXT: ret
}
@@ -1053,10 +1064,10 @@ entry:
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: qxx01:
-; LINUX-64-PIC: movq xdst@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: addq $64, %rax
-; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), %rcx
-; LINUX-64-PIC-NEXT: movq %rax, (%rcx)
+; LINUX-64-PIC: movq xdst@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: addq $64, [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movq [[RAX]], ([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _qxx01:
@@ -1064,41 +1075,41 @@ entry:
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _qxx01:
-; DARWIN-32-DYNAMIC: movl L_xdst$non_lazy_ptr, %eax
-; DARWIN-32-DYNAMIC-NEXT: addl $64, %eax
-; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl %eax, (%ecx)
+; DARWIN-32-DYNAMIC: movl L_xdst$non_lazy_ptr, [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: addl $64, [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], ([[ECX]])
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _qxx01:
; DARWIN-32-PIC: calll L15$pb
; DARWIN-32-PIC-NEXT: L15$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L15$pb(%eax), %ecx
-; DARWIN-32-PIC-NEXT: addl $64, %ecx
-; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L15$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: movl %ecx, (%eax)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L15$pb([[EAX]]), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: addl $64, [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L15$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[ECX]], ([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _qxx01:
-; DARWIN-64-STATIC: movq _xdst@GOTPCREL(%rip), %rax
-; DARWIN-64-STATIC-NEXT: addq $64, %rax
-; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-STATIC-NEXT: movq %rax, (%rcx)
+; DARWIN-64-STATIC: movq _xdst@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: addq $64, [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movq [[RAX]], ([[RCX]])
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _qxx01:
-; DARWIN-64-DYNAMIC: movq _xdst@GOTPCREL(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: addq $64, %rax
-; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movq %rax, (%rcx)
+; DARWIN-64-DYNAMIC: movq _xdst@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: addq $64, [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], ([[RCX]])
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _qxx01:
-; DARWIN-64-PIC: movq _xdst@GOTPCREL(%rip), %rax
-; DARWIN-64-PIC-NEXT: addq $64, %rax
-; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-PIC-NEXT: movq %rax, (%rcx)
+; DARWIN-64-PIC: movq _xdst@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: addq $64, [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movq [[RAX]], ([[RCX]])
; DARWIN-64-PIC-NEXT: ret
}
@@ -1109,79 +1120,79 @@ entry:
%2 = getelementptr i32* %0, i64 16
store i32 %1, i32* %2, align 4
; LINUX-64-STATIC: qux02:
-; LINUX-64-STATIC: movl src+64(%rip), %eax
-; LINUX-64-STATIC: movq ptr(%rip), %rcx
-; LINUX-64-STATIC: movl %eax, 64(%rcx)
+; LINUX-64-STATIC: movl src+64(%rip), [[EAX:%e.x]]
+; LINUX-64-STATIC: movq ptr(%rip), [[RCX:%r.x]]
+; LINUX-64-STATIC: movl [[EAX]], 64([[RCX]])
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: qux02:
-; LINUX-32-STATIC: movl src+64, %eax
-; LINUX-32-STATIC-NEXT: movl ptr, %ecx
-; LINUX-32-STATIC-NEXT: movl %eax, 64(%ecx)
+; LINUX-32-STATIC: movl src+64, [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl ptr, [[ECX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[EAX]], 64([[ECX]])
; LINUX-32-STATIC-NEXT: ret
ret void
; LINUX-32-PIC: qux02:
-; LINUX-32-PIC: movl src+64, %eax
-; LINUX-32-PIC-NEXT: movl ptr, %ecx
-; LINUX-32-PIC-NEXT: movl %eax, 64(%ecx)
+; LINUX-32-PIC: movl src+64, [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl ptr, [[ECX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[EAX]], 64([[ECX]])
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: qux02:
-; LINUX-64-PIC: movq src@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: movl 64(%rax), %eax
-; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), %rcx
-; LINUX-64-PIC-NEXT: movq (%rcx), %rcx
-; LINUX-64-PIC-NEXT: movl %eax, 64(%rcx)
+; LINUX-64-PIC: movq src@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]]
+; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movl [[EAX]], 64([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _qux02:
-; DARWIN-32-STATIC: movl _src+64, %eax
-; DARWIN-32-STATIC-NEXT: movl _ptr, %ecx
-; DARWIN-32-STATIC-NEXT: movl %eax, 64(%ecx)
+; DARWIN-32-STATIC: movl _src+64, [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl _ptr, [[ECX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[EAX]], 64([[ECX]])
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _qux02:
-; DARWIN-32-DYNAMIC: movl L_src$non_lazy_ptr, %eax
-; DARWIN-32-DYNAMIC-NEXT: movl 64(%eax), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl (%ecx), %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl %eax, 64(%ecx)
+; DARWIN-32-DYNAMIC: movl L_src$non_lazy_ptr, [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl 64([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl ([[ECX]]), [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], 64([[ECX]])
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _qux02:
; DARWIN-32-PIC: calll L16$pb
; DARWIN-32-PIC-NEXT: L16$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L16$pb(%eax), %ecx
-; DARWIN-32-PIC-NEXT: movl 64(%ecx), %ecx
-; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L16$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: movl (%eax), %eax
-; DARWIN-32-PIC-NEXT: movl %ecx, 64(%eax)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L16$pb([[EAX]]), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 64([[ECX]]), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L16$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl ([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[ECX]], 64([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _qux02:
-; DARWIN-64-STATIC: movq _src@GOTPCREL(%rip), %rax
-; DARWIN-64-STATIC-NEXT: movl 64(%rax), %eax
-; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-STATIC-NEXT: movq (%rcx), %rcx
-; DARWIN-64-STATIC-NEXT: movl %eax, 64(%rcx)
+; DARWIN-64-STATIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]]
+; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl [[EAX]], 64([[RCX]])
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _qux02:
-; DARWIN-64-DYNAMIC: movq _src@GOTPCREL(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: movl 64(%rax), %eax
-; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movq (%rcx), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movl %eax, 64(%rcx)
+; DARWIN-64-DYNAMIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 64([[RCX]])
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _qux02:
-; DARWIN-64-PIC: movq _src@GOTPCREL(%rip), %rax
-; DARWIN-64-PIC-NEXT: movl 64(%rax), %eax
-; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-PIC-NEXT: movq (%rcx), %rcx
-; DARWIN-64-PIC-NEXT: movl %eax, 64(%rcx)
+; DARWIN-64-PIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]]
+; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl [[EAX]], 64([[RCX]])
; DARWIN-64-PIC-NEXT: ret
}
@@ -1192,79 +1203,79 @@ entry:
%2 = getelementptr i32* %0, i64 16
store i32 %1, i32* %2, align 4
; LINUX-64-STATIC: qxx02:
-; LINUX-64-STATIC: movl xsrc+64(%rip), %eax
-; LINUX-64-STATIC: movq ptr(%rip), %rcx
-; LINUX-64-STATIC: movl %eax, 64(%rcx)
+; LINUX-64-STATIC: movl xsrc+64(%rip), [[EAX:%e.x]]
+; LINUX-64-STATIC: movq ptr(%rip), [[RCX:%r.x]]
+; LINUX-64-STATIC: movl [[EAX]], 64([[RCX]])
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: qxx02:
-; LINUX-32-STATIC: movl xsrc+64, %eax
-; LINUX-32-STATIC-NEXT: movl ptr, %ecx
-; LINUX-32-STATIC-NEXT: movl %eax, 64(%ecx)
+; LINUX-32-STATIC: movl xsrc+64, [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl ptr, [[ECX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[EAX]], 64([[ECX]])
; LINUX-32-STATIC-NEXT: ret
ret void
; LINUX-32-PIC: qxx02:
-; LINUX-32-PIC: movl xsrc+64, %eax
-; LINUX-32-PIC-NEXT: movl ptr, %ecx
-; LINUX-32-PIC-NEXT: movl %eax, 64(%ecx)
+; LINUX-32-PIC: movl xsrc+64, [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl ptr, [[ECX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[EAX]], 64([[ECX]])
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: qxx02:
-; LINUX-64-PIC: movq xsrc@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: movl 64(%rax), %eax
-; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), %rcx
-; LINUX-64-PIC-NEXT: movq (%rcx), %rcx
-; LINUX-64-PIC-NEXT: movl %eax, 64(%rcx)
+; LINUX-64-PIC: movq xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]]
+; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movl [[EAX]], 64([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _qxx02:
-; DARWIN-32-STATIC: movl _xsrc+64, %eax
-; DARWIN-32-STATIC-NEXT: movl _ptr, %ecx
-; DARWIN-32-STATIC-NEXT: movl %eax, 64(%ecx)
+; DARWIN-32-STATIC: movl _xsrc+64, [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl _ptr, [[ECX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[EAX]], 64([[ECX]])
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _qxx02:
-; DARWIN-32-DYNAMIC: movl L_xsrc$non_lazy_ptr, %eax
-; DARWIN-32-DYNAMIC-NEXT: movl 64(%eax), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl (%ecx), %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl %eax, 64(%ecx)
+; DARWIN-32-DYNAMIC: movl L_xsrc$non_lazy_ptr, [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl 64([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl ([[ECX]]), [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], 64([[ECX]])
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _qxx02:
; DARWIN-32-PIC: calll L17$pb
; DARWIN-32-PIC-NEXT: L17$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L17$pb(%eax), %ecx
-; DARWIN-32-PIC-NEXT: movl 64(%ecx), %ecx
-; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L17$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: movl (%eax), %eax
-; DARWIN-32-PIC-NEXT: movl %ecx, 64(%eax)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L17$pb([[EAX]]), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 64([[ECX]]), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L17$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl ([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[ECX]], 64([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _qxx02:
-; DARWIN-64-STATIC: movq _xsrc@GOTPCREL(%rip), %rax
-; DARWIN-64-STATIC-NEXT: movl 64(%rax), %eax
-; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-STATIC-NEXT: movq (%rcx), %rcx
-; DARWIN-64-STATIC-NEXT: movl %eax, 64(%rcx)
+; DARWIN-64-STATIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]]
+; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl [[EAX]], 64([[RCX]])
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _qxx02:
-; DARWIN-64-DYNAMIC: movq _xsrc@GOTPCREL(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: movl 64(%rax), %eax
-; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movq (%rcx), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movl %eax, 64(%rcx)
+; DARWIN-64-DYNAMIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 64([[RCX]])
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _qxx02:
-; DARWIN-64-PIC: movq _xsrc@GOTPCREL(%rip), %rax
-; DARWIN-64-PIC-NEXT: movl 64(%rax), %eax
-; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-PIC-NEXT: movq (%rcx), %rcx
-; DARWIN-64-PIC-NEXT: movl %eax, 64(%rcx)
+; DARWIN-64-PIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]]
+; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl [[EAX]], 64([[RCX]])
; DARWIN-64-PIC-NEXT: ret
}
@@ -1274,58 +1285,58 @@ entry:
store i32 %0, i32* getelementptr ([131072 x i32]* @ddst, i32 0, i64 16), align 32
ret void
; LINUX-64-STATIC: qux03:
-; LINUX-64-STATIC: movl dsrc+64(%rip), %eax
-; LINUX-64-STATIC: movl %eax, ddst+64(%rip)
+; LINUX-64-STATIC: movl dsrc+64(%rip), [[EAX:%e.x]]
+; LINUX-64-STATIC: movl [[EAX]], ddst+64(%rip)
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: qux03:
-; LINUX-32-STATIC: movl dsrc+64, %eax
-; LINUX-32-STATIC-NEXT: movl %eax, ddst+64
+; LINUX-32-STATIC: movl dsrc+64, [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[EAX]], ddst+64
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: qux03:
-; LINUX-32-PIC: movl dsrc+64, %eax
-; LINUX-32-PIC-NEXT: movl %eax, ddst+64
+; LINUX-32-PIC: movl dsrc+64, [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[EAX]], ddst+64
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: qux03:
-; LINUX-64-PIC: movq dsrc@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: movl 64(%rax), %eax
-; LINUX-64-PIC-NEXT: movq ddst@GOTPCREL(%rip), %rcx
-; LINUX-64-PIC-NEXT: movl %eax, 64(%rcx)
+; LINUX-64-PIC: movq dsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]]
+; LINUX-64-PIC-NEXT: movq ddst@GOTPCREL(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movl [[EAX]], 64([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _qux03:
-; DARWIN-32-STATIC: movl _dsrc+64, %eax
-; DARWIN-32-STATIC-NEXT: movl %eax, _ddst+64
+; DARWIN-32-STATIC: movl _dsrc+64, [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[EAX]], _ddst+64
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _qux03:
-; DARWIN-32-DYNAMIC: movl _dsrc+64, %eax
-; DARWIN-32-DYNAMIC-NEXT: movl %eax, _ddst+64
+; DARWIN-32-DYNAMIC: movl _dsrc+64, [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], _ddst+64
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _qux03:
; DARWIN-32-PIC: calll L18$pb
; DARWIN-32-PIC-NEXT: L18$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl (_dsrc-L18$pb)+64(%eax), %ecx
-; DARWIN-32-PIC-NEXT: movl %ecx, (_ddst-L18$pb)+64(%eax)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl (_dsrc-L18$pb)+64([[EAX]]), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[ECX]], (_ddst-L18$pb)+64([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _qux03:
-; DARWIN-64-STATIC: movl _dsrc+64(%rip), %eax
-; DARWIN-64-STATIC-NEXT: movl %eax, _ddst+64(%rip)
+; DARWIN-64-STATIC: movl _dsrc+64(%rip), [[EAX:%e.x]]
+; DARWIN-64-STATIC-NEXT: movl [[EAX]], _ddst+64(%rip)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _qux03:
-; DARWIN-64-DYNAMIC: movl _dsrc+64(%rip), %eax
-; DARWIN-64-DYNAMIC-NEXT: movl %eax, _ddst+64(%rip)
+; DARWIN-64-DYNAMIC: movl _dsrc+64(%rip), [[EAX:%e.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], _ddst+64(%rip)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _qux03:
-; DARWIN-64-PIC: movl _dsrc+64(%rip), %eax
-; DARWIN-64-PIC-NEXT: movl %eax, _ddst+64(%rip)
+; DARWIN-64-PIC: movl _dsrc+64(%rip), [[EAX:%e.x]]
+; DARWIN-64-PIC-NEXT: movl [[EAX]], _ddst+64(%rip)
; DARWIN-64-PIC-NEXT: ret
}
@@ -1346,10 +1357,10 @@ entry:
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: qux04:
-; LINUX-64-PIC: movq ddst@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: addq $64, %rax
-; LINUX-64-PIC-NEXT: movq dptr@GOTPCREL(%rip), %rcx
-; LINUX-64-PIC-NEXT: movq %rax, (%rcx)
+; LINUX-64-PIC: movq ddst@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: addq $64, [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movq dptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movq [[RAX]], ([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _qux04:
@@ -1363,24 +1374,24 @@ entry:
; DARWIN-32-PIC: _qux04:
; DARWIN-32-PIC: calll L19$pb
; DARWIN-32-PIC-NEXT: L19$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: leal (_ddst-L19$pb)+64(%eax), %ecx
-; DARWIN-32-PIC-NEXT: movl %ecx, _dptr-L19$pb(%eax)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal (_ddst-L19$pb)+64([[EAX]]), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[ECX]], _dptr-L19$pb([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _qux04:
-; DARWIN-64-STATIC: leaq _ddst+64(%rip), %rax
-; DARWIN-64-STATIC-NEXT: movq %rax, _dptr(%rip)
+; DARWIN-64-STATIC: leaq _ddst+64(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movq [[RAX]], _dptr(%rip)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _qux04:
-; DARWIN-64-DYNAMIC: leaq _ddst+64(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: movq %rax, _dptr(%rip)
+; DARWIN-64-DYNAMIC: leaq _ddst+64(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], _dptr(%rip)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _qux04:
-; DARWIN-64-PIC: leaq _ddst+64(%rip), %rax
-; DARWIN-64-PIC-NEXT: movq %rax, _dptr(%rip)
+; DARWIN-64-PIC: leaq _ddst+64(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movq [[RAX]], _dptr(%rip)
; DARWIN-64-PIC-NEXT: ret
}
@@ -1391,69 +1402,69 @@ entry:
%2 = getelementptr i32* %0, i64 16
store i32 %1, i32* %2, align 4
; LINUX-64-STATIC: qux05:
-; LINUX-64-STATIC: movl dsrc+64(%rip), %eax
-; LINUX-64-STATIC: movq dptr(%rip), %rcx
-; LINUX-64-STATIC: movl %eax, 64(%rcx)
+; LINUX-64-STATIC: movl dsrc+64(%rip), [[EAX:%e.x]]
+; LINUX-64-STATIC: movq dptr(%rip), [[RCX:%r.x]]
+; LINUX-64-STATIC: movl [[EAX]], 64([[RCX]])
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: qux05:
-; LINUX-32-STATIC: movl dsrc+64, %eax
-; LINUX-32-STATIC-NEXT: movl dptr, %ecx
-; LINUX-32-STATIC-NEXT: movl %eax, 64(%ecx)
+; LINUX-32-STATIC: movl dsrc+64, [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl dptr, [[ECX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[EAX]], 64([[ECX]])
; LINUX-32-STATIC-NEXT: ret
ret void
; LINUX-32-PIC: qux05:
-; LINUX-32-PIC: movl dsrc+64, %eax
-; LINUX-32-PIC-NEXT: movl dptr, %ecx
-; LINUX-32-PIC-NEXT: movl %eax, 64(%ecx)
+; LINUX-32-PIC: movl dsrc+64, [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl dptr, [[ECX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[EAX]], 64([[ECX]])
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: qux05:
-; LINUX-64-PIC: movq dsrc@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: movl 64(%rax), %eax
-; LINUX-64-PIC-NEXT: movq dptr@GOTPCREL(%rip), %rcx
-; LINUX-64-PIC-NEXT: movq (%rcx), %rcx
-; LINUX-64-PIC-NEXT: movl %eax, 64(%rcx)
+; LINUX-64-PIC: movq dsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]]
+; LINUX-64-PIC-NEXT: movq dptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movl [[EAX]], 64([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _qux05:
-; DARWIN-32-STATIC: movl _dsrc+64, %eax
-; DARWIN-32-STATIC-NEXT: movl _dptr, %ecx
-; DARWIN-32-STATIC-NEXT: movl %eax, 64(%ecx)
+; DARWIN-32-STATIC: movl _dsrc+64, [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl _dptr, [[ECX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[EAX]], 64([[ECX]])
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _qux05:
-; DARWIN-32-DYNAMIC: movl _dsrc+64, %eax
-; DARWIN-32-DYNAMIC-NEXT: movl _dptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl %eax, 64(%ecx)
+; DARWIN-32-DYNAMIC: movl _dsrc+64, [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl _dptr, [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], 64([[ECX]])
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _qux05:
; DARWIN-32-PIC: calll L20$pb
; DARWIN-32-PIC-NEXT: L20$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl (_dsrc-L20$pb)+64(%eax), %ecx
-; DARWIN-32-PIC-NEXT: movl _dptr-L20$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: movl %ecx, 64(%eax)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl (_dsrc-L20$pb)+64([[EAX]]), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl _dptr-L20$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[ECX]], 64([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _qux05:
-; DARWIN-64-STATIC: movl _dsrc+64(%rip), %eax
-; DARWIN-64-STATIC-NEXT: movq _dptr(%rip), %rcx
-; DARWIN-64-STATIC-NEXT: movl %eax, 64(%rcx)
+; DARWIN-64-STATIC: movl _dsrc+64(%rip), [[EAX:%e.x]]
+; DARWIN-64-STATIC-NEXT: movq _dptr(%rip), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl [[EAX]], 64([[RCX]])
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _qux05:
-; DARWIN-64-DYNAMIC: movl _dsrc+64(%rip), %eax
-; DARWIN-64-DYNAMIC-NEXT: movq _dptr(%rip), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movl %eax, 64(%rcx)
+; DARWIN-64-DYNAMIC: movl _dsrc+64(%rip), [[EAX:%e.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq _dptr(%rip), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 64([[RCX]])
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _qux05:
-; DARWIN-64-PIC: movl _dsrc+64(%rip), %eax
-; DARWIN-64-PIC-NEXT: movq _dptr(%rip), %rcx
-; DARWIN-64-PIC-NEXT: movl %eax, 64(%rcx)
+; DARWIN-64-PIC: movl _dsrc+64(%rip), [[EAX:%e.x]]
+; DARWIN-64-PIC-NEXT: movq _dptr(%rip), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl [[EAX]], 64([[RCX]])
; DARWIN-64-PIC-NEXT: ret
}
@@ -1463,56 +1474,56 @@ entry:
store i32 %0, i32* getelementptr ([131072 x i32]* @ldst, i32 0, i64 16), align 4
ret void
; LINUX-64-STATIC: qux06:
-; LINUX-64-STATIC: movl lsrc+64(%rip), %eax
-; LINUX-64-STATIC: movl %eax, ldst+64
+; LINUX-64-STATIC: movl lsrc+64(%rip), [[EAX:%e.x]]
+; LINUX-64-STATIC: movl [[EAX]], ldst+64
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: qux06:
-; LINUX-32-STATIC: movl lsrc+64, %eax
-; LINUX-32-STATIC-NEXT: movl %eax, ldst+64
+; LINUX-32-STATIC: movl lsrc+64, [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[EAX]], ldst+64
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: qux06:
-; LINUX-32-PIC: movl lsrc+64, %eax
-; LINUX-32-PIC-NEXT: movl %eax, ldst+64
+; LINUX-32-PIC: movl lsrc+64, [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[EAX]], ldst+64
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: qux06:
-; LINUX-64-PIC: movl lsrc+64(%rip), %eax
-; LINUX-64-PIC-NEXT: movl %eax, ldst+64(%rip)
+; LINUX-64-PIC: movl lsrc+64(%rip), [[EAX:%e.x]]
+; LINUX-64-PIC-NEXT: movl [[EAX]], ldst+64(%rip)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _qux06:
-; DARWIN-32-STATIC: movl _lsrc+64, %eax
-; DARWIN-32-STATIC-NEXT: movl %eax, _ldst+64
+; DARWIN-32-STATIC: movl _lsrc+64, [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[EAX]], _ldst+64
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _qux06:
-; DARWIN-32-DYNAMIC: movl _lsrc+64, %eax
-; DARWIN-32-DYNAMIC-NEXT: movl %eax, _ldst+64
+; DARWIN-32-DYNAMIC: movl _lsrc+64, [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], _ldst+64
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _qux06:
; DARWIN-32-PIC: calll L21$pb
; DARWIN-32-PIC-NEXT: L21$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl (_lsrc-L21$pb)+64(%eax), %ecx
-; DARWIN-32-PIC-NEXT: movl %ecx, (_ldst-L21$pb)+64(%eax)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl (_lsrc-L21$pb)+64([[EAX]]), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[ECX]], (_ldst-L21$pb)+64([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _qux06:
-; DARWIN-64-STATIC: movl _lsrc+64(%rip), %eax
-; DARWIN-64-STATIC-NEXT: movl %eax, _ldst+64(%rip)
+; DARWIN-64-STATIC: movl _lsrc+64(%rip), [[EAX:%e.x]]
+; DARWIN-64-STATIC-NEXT: movl [[EAX]], _ldst+64(%rip)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _qux06:
-; DARWIN-64-DYNAMIC: movl _lsrc+64(%rip), %eax
-; DARWIN-64-DYNAMIC-NEXT: movl %eax, _ldst+64(%rip)
+; DARWIN-64-DYNAMIC: movl _lsrc+64(%rip), [[EAX:%e.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], _ldst+64(%rip)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _qux06:
-; DARWIN-64-PIC: movl _lsrc+64(%rip), %eax
-; DARWIN-64-PIC-NEXT: movl %eax, _ldst+64(%rip)
+; DARWIN-64-PIC: movl _lsrc+64(%rip), [[EAX:%e.x]]
+; DARWIN-64-PIC-NEXT: movl [[EAX]], _ldst+64(%rip)
; DARWIN-64-PIC-NEXT: ret
}
@@ -1533,8 +1544,8 @@ entry:
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: qux07:
-; LINUX-64-PIC: leaq ldst+64(%rip), %rax
-; LINUX-64-PIC-NEXT: movq %rax, lptr(%rip)
+; LINUX-64-PIC: leaq ldst+64(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movq [[RAX]], lptr(%rip)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _qux07:
@@ -1548,24 +1559,24 @@ entry:
; DARWIN-32-PIC: _qux07:
; DARWIN-32-PIC: calll L22$pb
; DARWIN-32-PIC-NEXT: L22$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: leal (_ldst-L22$pb)+64(%eax), %ecx
-; DARWIN-32-PIC-NEXT: movl %ecx, _lptr-L22$pb(%eax)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal (_ldst-L22$pb)+64([[EAX]]), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[ECX]], _lptr-L22$pb([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _qux07:
-; DARWIN-64-STATIC: leaq _ldst+64(%rip), %rax
-; DARWIN-64-STATIC-NEXT: movq %rax, _lptr(%rip)
+; DARWIN-64-STATIC: leaq _ldst+64(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movq [[RAX]], _lptr(%rip)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _qux07:
-; DARWIN-64-DYNAMIC: leaq _ldst+64(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: movq %rax, _lptr(%rip)
+; DARWIN-64-DYNAMIC: leaq _ldst+64(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], _lptr(%rip)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _qux07:
-; DARWIN-64-PIC: leaq _ldst+64(%rip), %rax
-; DARWIN-64-PIC-NEXT: movq %rax, _lptr(%rip)
+; DARWIN-64-PIC: leaq _ldst+64(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movq [[RAX]], _lptr(%rip)
; DARWIN-64-PIC-NEXT: ret
}
@@ -1576,67 +1587,67 @@ entry:
%2 = getelementptr i32* %0, i64 16
store i32 %1, i32* %2, align 4
; LINUX-64-STATIC: qux08:
-; LINUX-64-STATIC: movl lsrc+64(%rip), %eax
-; LINUX-64-STATIC: movq lptr(%rip), %rcx
-; LINUX-64-STATIC: movl %eax, 64(%rcx)
+; LINUX-64-STATIC: movl lsrc+64(%rip), [[EAX:%e.x]]
+; LINUX-64-STATIC: movq lptr(%rip), [[RCX:%r.x]]
+; LINUX-64-STATIC: movl [[EAX]], 64([[RCX]])
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: qux08:
-; LINUX-32-STATIC: movl lsrc+64, %eax
-; LINUX-32-STATIC-NEXT: movl lptr, %ecx
-; LINUX-32-STATIC-NEXT: movl %eax, 64(%ecx)
+; LINUX-32-STATIC: movl lsrc+64, [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl lptr, [[ECX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[EAX]], 64([[ECX]])
; LINUX-32-STATIC-NEXT: ret
ret void
; LINUX-32-PIC: qux08:
-; LINUX-32-PIC: movl lsrc+64, %eax
-; LINUX-32-PIC-NEXT: movl lptr, %ecx
-; LINUX-32-PIC-NEXT: movl %eax, 64(%ecx)
+; LINUX-32-PIC: movl lsrc+64, [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl lptr, [[ECX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[EAX]], 64([[ECX]])
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: qux08:
-; LINUX-64-PIC: movl lsrc+64(%rip), %eax
-; LINUX-64-PIC-NEXT: movq lptr(%rip), %rcx
-; LINUX-64-PIC-NEXT: movl %eax, 64(%rcx)
+; LINUX-64-PIC: movl lsrc+64(%rip), [[EAX:%e.x]]
+; LINUX-64-PIC-NEXT: movq lptr(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movl [[EAX]], 64([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _qux08:
-; DARWIN-32-STATIC: movl _lsrc+64, %eax
-; DARWIN-32-STATIC-NEXT: movl _lptr, %ecx
-; DARWIN-32-STATIC-NEXT: movl %eax, 64(%ecx)
+; DARWIN-32-STATIC: movl _lsrc+64, [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl _lptr, [[ECX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[EAX]], 64([[ECX]])
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _qux08:
-; DARWIN-32-DYNAMIC: movl _lsrc+64, %eax
-; DARWIN-32-DYNAMIC-NEXT: movl _lptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl %eax, 64(%ecx)
+; DARWIN-32-DYNAMIC: movl _lsrc+64, [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl _lptr, [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], 64([[ECX]])
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _qux08:
; DARWIN-32-PIC: calll L23$pb
; DARWIN-32-PIC-NEXT: L23$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl (_lsrc-L23$pb)+64(%eax), %ecx
-; DARWIN-32-PIC-NEXT: movl _lptr-L23$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: movl %ecx, 64(%eax)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl (_lsrc-L23$pb)+64([[EAX]]), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl _lptr-L23$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[ECX]], 64([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _qux08:
-; DARWIN-64-STATIC: movl _lsrc+64(%rip), %eax
-; DARWIN-64-STATIC-NEXT: movq _lptr(%rip), %rcx
-; DARWIN-64-STATIC-NEXT: movl %eax, 64(%rcx)
+; DARWIN-64-STATIC: movl _lsrc+64(%rip), [[EAX:%e.x]]
+; DARWIN-64-STATIC-NEXT: movq _lptr(%rip), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl [[EAX]], 64([[RCX]])
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _qux08:
-; DARWIN-64-DYNAMIC: movl _lsrc+64(%rip), %eax
-; DARWIN-64-DYNAMIC-NEXT: movq _lptr(%rip), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movl %eax, 64(%rcx)
+; DARWIN-64-DYNAMIC: movl _lsrc+64(%rip), [[EAX:%e.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq _lptr(%rip), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 64([[RCX]])
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _qux08:
-; DARWIN-64-PIC: movl _lsrc+64(%rip), %eax
-; DARWIN-64-PIC-NEXT: movq _lptr(%rip), %rcx
-; DARWIN-64-PIC-NEXT: movl %eax, 64(%rcx)
+; DARWIN-64-PIC: movl _lsrc+64(%rip), [[EAX:%e.x]]
+; DARWIN-64-PIC-NEXT: movq _lptr(%rip), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl [[EAX]], 64([[RCX]])
; DARWIN-64-PIC-NEXT: ret
}
@@ -1648,73 +1659,73 @@ entry:
store i32 %1, i32* %2, align 4
ret void
; LINUX-64-STATIC: ind00:
-; LINUX-64-STATIC: movl src(,%rdi,4), %eax
-; LINUX-64-STATIC: movl %eax, dst(,%rdi,4)
+; LINUX-64-STATIC: movl src(,%rdi,4), [[EAX:%e.x]]
+; LINUX-64-STATIC: movl [[EAX]], dst(,%rdi,4)
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: ind00:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: movl src(,%eax,4), %ecx
-; LINUX-32-STATIC-NEXT: movl %ecx, dst(,%eax,4)
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl src(,[[EAX]],4), [[ECX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[ECX]], dst(,[[EAX]],4)
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: ind00:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: movl src(,%eax,4), %ecx
-; LINUX-32-PIC-NEXT: movl %ecx, dst(,%eax,4)
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl src(,[[EAX]],4), [[ECX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[ECX]], dst(,[[EAX]],4)
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: ind00:
-; LINUX-64-PIC: movq src@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: movl (%rax,%rdi,4), %eax
-; LINUX-64-PIC-NEXT: movq dst@GOTPCREL(%rip), %rcx
-; LINUX-64-PIC-NEXT: movl %eax, (%rcx,%rdi,4)
+; LINUX-64-PIC: movq src@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
+; LINUX-64-PIC-NEXT: movq dst@GOTPCREL(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _ind00:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: movl _src(,%eax,4), %ecx
-; DARWIN-32-STATIC-NEXT: movl %ecx, _dst(,%eax,4)
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl _src(,[[EAX]],4), [[ECX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[ECX]], _dst(,[[EAX]],4)
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _ind00:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl L_src$non_lazy_ptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl (%ecx,%eax,4), %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl L_dst$non_lazy_ptr, %edx
-; DARWIN-32-DYNAMIC-NEXT: movl %ecx, (%edx,%eax,4)
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_src$non_lazy_ptr, [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl ([[ECX]],[[EAX]],4), [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_dst$non_lazy_ptr, [[EDX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4)
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _ind00:
; DARWIN-32-PIC: calll L24$pb
; DARWIN-32-PIC-NEXT: L24$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L24$pb(%eax), %edx
-; DARWIN-32-PIC-NEXT: movl (%edx,%ecx,4), %edx
-; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L24$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: movl %edx, (%eax,%ecx,4)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L24$pb([[EAX]]), [[EDX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl ([[EDX]],[[ECX]],4), [[EDX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L24$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[EDX]], ([[EAX]],[[ECX]],4)
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _ind00:
-; DARWIN-64-STATIC: movq _src@GOTPCREL(%rip), %rax
-; DARWIN-64-STATIC-NEXT: movl (%rax,%rdi,4), %eax
-; DARWIN-64-STATIC-NEXT: movq _dst@GOTPCREL(%rip), %rcx
-; DARWIN-64-STATIC-NEXT: movl %eax, (%rcx,%rdi,4)
+; DARWIN-64-STATIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-STATIC-NEXT: movq _dst@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _ind00:
-; DARWIN-64-DYNAMIC: movq _src@GOTPCREL(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: movl (%rax,%rdi,4), %eax
-; DARWIN-64-DYNAMIC-NEXT: movq _dst@GOTPCREL(%rip), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movl %eax, (%rcx,%rdi,4)
+; DARWIN-64-DYNAMIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq _dst@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _ind00:
-; DARWIN-64-PIC: movq _src@GOTPCREL(%rip), %rax
-; DARWIN-64-PIC-NEXT: movl (%rax,%rdi,4), %eax
-; DARWIN-64-PIC-NEXT: movq _dst@GOTPCREL(%rip), %rcx
-; DARWIN-64-PIC-NEXT: movl %eax, (%rcx,%rdi,4)
+; DARWIN-64-PIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-PIC-NEXT: movq _dst@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; DARWIN-64-PIC-NEXT: ret
}
@@ -1726,73 +1737,73 @@ entry:
store i32 %1, i32* %2, align 4
ret void
; LINUX-64-STATIC: ixd00:
-; LINUX-64-STATIC: movl xsrc(,%rdi,4), %eax
-; LINUX-64-STATIC: movl %eax, xdst(,%rdi,4)
+; LINUX-64-STATIC: movl xsrc(,%rdi,4), [[EAX:%e.x]]
+; LINUX-64-STATIC: movl [[EAX]], xdst(,%rdi,4)
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: ixd00:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: movl xsrc(,%eax,4), %ecx
-; LINUX-32-STATIC-NEXT: movl %ecx, xdst(,%eax,4)
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl xsrc(,[[EAX]],4), [[ECX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[ECX]], xdst(,[[EAX]],4)
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: ixd00:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: movl xsrc(,%eax,4), %ecx
-; LINUX-32-PIC-NEXT: movl %ecx, xdst(,%eax,4)
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl xsrc(,[[EAX]],4), [[ECX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[ECX]], xdst(,[[EAX]],4)
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: ixd00:
-; LINUX-64-PIC: movq xsrc@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: movl (%rax,%rdi,4), %eax
-; LINUX-64-PIC-NEXT: movq xdst@GOTPCREL(%rip), %rcx
-; LINUX-64-PIC-NEXT: movl %eax, (%rcx,%rdi,4)
+; LINUX-64-PIC: movq xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
+; LINUX-64-PIC-NEXT: movq xdst@GOTPCREL(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _ixd00:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: movl _xsrc(,%eax,4), %ecx
-; DARWIN-32-STATIC-NEXT: movl %ecx, _xdst(,%eax,4)
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl _xsrc(,[[EAX]],4), [[ECX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[ECX]], _xdst(,[[EAX]],4)
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _ixd00:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl L_xsrc$non_lazy_ptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl (%ecx,%eax,4), %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl L_xdst$non_lazy_ptr, %edx
-; DARWIN-32-DYNAMIC-NEXT: movl %ecx, (%edx,%eax,4)
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_xsrc$non_lazy_ptr, [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl ([[ECX]],[[EAX]],4), [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_xdst$non_lazy_ptr, [[EDX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4)
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _ixd00:
; DARWIN-32-PIC: calll L25$pb
; DARWIN-32-PIC-NEXT: L25$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L25$pb(%eax), %edx
-; DARWIN-32-PIC-NEXT: movl (%edx,%ecx,4), %edx
-; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L25$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: movl %edx, (%eax,%ecx,4)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L25$pb([[EAX]]), [[EDX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl ([[EDX]],[[ECX]],4), [[EDX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L25$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[EDX]], ([[EAX]],[[ECX]],4)
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _ixd00:
-; DARWIN-64-STATIC: movq _xsrc@GOTPCREL(%rip), %rax
-; DARWIN-64-STATIC-NEXT: movl (%rax,%rdi,4), %eax
-; DARWIN-64-STATIC-NEXT: movq _xdst@GOTPCREL(%rip), %rcx
-; DARWIN-64-STATIC-NEXT: movl %eax, (%rcx,%rdi,4)
+; DARWIN-64-STATIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-STATIC-NEXT: movq _xdst@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _ixd00:
-; DARWIN-64-DYNAMIC: movq _xsrc@GOTPCREL(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: movl (%rax,%rdi,4), %eax
-; DARWIN-64-DYNAMIC-NEXT: movq _xdst@GOTPCREL(%rip), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movl %eax, (%rcx,%rdi,4)
+; DARWIN-64-DYNAMIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq _xdst@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _ixd00:
-; DARWIN-64-PIC: movq _xsrc@GOTPCREL(%rip), %rax
-; DARWIN-64-PIC-NEXT: movl (%rax,%rdi,4), %eax
-; DARWIN-64-PIC-NEXT: movq _xdst@GOTPCREL(%rip), %rcx
-; DARWIN-64-PIC-NEXT: movl %eax, (%rcx,%rdi,4)
+; DARWIN-64-PIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-PIC-NEXT: movq _xdst@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; DARWIN-64-PIC-NEXT: ret
}
@@ -1802,73 +1813,73 @@ entry:
store i32* %0, i32** @ptr, align 8
ret void
; LINUX-64-STATIC: ind01:
-; LINUX-64-STATIC: leaq dst(,%rdi,4), %rax
-; LINUX-64-STATIC: movq %rax, ptr
+; LINUX-64-STATIC: leaq dst(,%rdi,4), [[RAX:%r.x]]
+; LINUX-64-STATIC: movq [[RAX]], ptr
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: ind01:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: leal dst(,%eax,4), %eax
-; LINUX-32-STATIC-NEXT: movl %eax, ptr
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: leal dst(,[[EAX]],4), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[EAX]], ptr
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: ind01:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: leal dst(,%eax,4), %eax
-; LINUX-32-PIC-NEXT: movl %eax, ptr
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: leal dst(,[[EAX]],4), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[EAX]], ptr
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: ind01:
; LINUX-64-PIC: shlq $2, %rdi
; LINUX-64-PIC-NEXT: addq dst@GOTPCREL(%rip), %rdi
-; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: movq %rdi, (%rax)
+; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movq %rdi, ([[RAX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _ind01:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: leal _dst(,%eax,4), %eax
-; DARWIN-32-STATIC-NEXT: movl %eax, _ptr
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: leal _dst(,[[EAX]],4), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[EAX]], _ptr
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _ind01:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: shll $2, %eax
-; DARWIN-32-DYNAMIC-NEXT: addl L_dst$non_lazy_ptr, %eax
-; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl %eax, (%ecx)
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: shll $2, [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: addl L_dst$non_lazy_ptr, [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], ([[ECX]])
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _ind01:
; DARWIN-32-PIC: calll L26$pb
; DARWIN-32-PIC-NEXT: L26$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: shll $2, %ecx
-; DARWIN-32-PIC-NEXT: addl L_dst$non_lazy_ptr-L26$pb(%eax), %ecx
-; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L26$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: movl %ecx, (%eax)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: shll $2, [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: addl L_dst$non_lazy_ptr-L26$pb([[EAX]]), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L26$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[ECX]], ([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _ind01:
; DARWIN-64-STATIC: shlq $2, %rdi
; DARWIN-64-STATIC-NEXT: addq _dst@GOTPCREL(%rip), %rdi
-; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), %rax
-; DARWIN-64-STATIC-NEXT: movq %rdi, (%rax)
+; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movq %rdi, ([[RAX]])
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _ind01:
; DARWIN-64-DYNAMIC: shlq $2, %rdi
; DARWIN-64-DYNAMIC-NEXT: addq _dst@GOTPCREL(%rip), %rdi
-; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: movq %rdi, (%rax)
+; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq %rdi, ([[RAX]])
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _ind01:
; DARWIN-64-PIC: shlq $2, %rdi
; DARWIN-64-PIC-NEXT: addq _dst@GOTPCREL(%rip), %rdi
-; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), %rax
-; DARWIN-64-PIC-NEXT: movq %rdi, (%rax)
+; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movq %rdi, ([[RAX]])
; DARWIN-64-PIC-NEXT: ret
}
@@ -1878,73 +1889,73 @@ entry:
store i32* %0, i32** @ptr, align 8
ret void
; LINUX-64-STATIC: ixd01:
-; LINUX-64-STATIC: leaq xdst(,%rdi,4), %rax
-; LINUX-64-STATIC: movq %rax, ptr
+; LINUX-64-STATIC: leaq xdst(,%rdi,4), [[RAX:%r.x]]
+; LINUX-64-STATIC: movq [[RAX]], ptr
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: ixd01:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: leal xdst(,%eax,4), %eax
-; LINUX-32-STATIC-NEXT: movl %eax, ptr
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: leal xdst(,[[EAX]],4), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[EAX]], ptr
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: ixd01:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: leal xdst(,%eax,4), %eax
-; LINUX-32-PIC-NEXT: movl %eax, ptr
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: leal xdst(,[[EAX]],4), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[EAX]], ptr
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: ixd01:
; LINUX-64-PIC: shlq $2, %rdi
; LINUX-64-PIC-NEXT: addq xdst@GOTPCREL(%rip), %rdi
-; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: movq %rdi, (%rax)
+; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movq %rdi, ([[RAX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _ixd01:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: leal _xdst(,%eax,4), %eax
-; DARWIN-32-STATIC-NEXT: movl %eax, _ptr
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: leal _xdst(,[[EAX]],4), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[EAX]], _ptr
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _ixd01:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: shll $2, %eax
-; DARWIN-32-DYNAMIC-NEXT: addl L_xdst$non_lazy_ptr, %eax
-; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl %eax, (%ecx)
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: shll $2, [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: addl L_xdst$non_lazy_ptr, [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], ([[ECX]])
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _ixd01:
; DARWIN-32-PIC: calll L27$pb
; DARWIN-32-PIC-NEXT: L27$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: shll $2, %ecx
-; DARWIN-32-PIC-NEXT: addl L_xdst$non_lazy_ptr-L27$pb(%eax), %ecx
-; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L27$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: movl %ecx, (%eax)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: shll $2, [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: addl L_xdst$non_lazy_ptr-L27$pb([[EAX]]), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L27$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[ECX]], ([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _ixd01:
; DARWIN-64-STATIC: shlq $2, %rdi
; DARWIN-64-STATIC-NEXT: addq _xdst@GOTPCREL(%rip), %rdi
-; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), %rax
-; DARWIN-64-STATIC-NEXT: movq %rdi, (%rax)
+; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movq %rdi, ([[RAX]])
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _ixd01:
; DARWIN-64-DYNAMIC: shlq $2, %rdi
; DARWIN-64-DYNAMIC-NEXT: addq _xdst@GOTPCREL(%rip), %rdi
-; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: movq %rdi, (%rax)
+; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq %rdi, ([[RAX]])
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _ixd01:
; DARWIN-64-PIC: shlq $2, %rdi
; DARWIN-64-PIC-NEXT: addq _xdst@GOTPCREL(%rip), %rdi
-; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), %rax
-; DARWIN-64-PIC-NEXT: movq %rdi, (%rax)
+; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movq %rdi, ([[RAX]])
; DARWIN-64-PIC-NEXT: ret
}
@@ -1957,83 +1968,83 @@ entry:
store i32 %2, i32* %3, align 4
ret void
; LINUX-64-STATIC: ind02:
-; LINUX-64-STATIC: movl src(,%rdi,4), %eax
-; LINUX-64-STATIC: movq ptr(%rip), %rcx
-; LINUX-64-STATIC: movl %eax, (%rcx,%rdi,4)
+; LINUX-64-STATIC: movl src(,%rdi,4), [[EAX:%e.x]]
+; LINUX-64-STATIC: movq ptr(%rip), [[RCX:%r.x]]
+; LINUX-64-STATIC: movl [[EAX]], ([[RCX]],%rdi,4)
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: ind02:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: movl src(,%eax,4), %ecx
-; LINUX-32-STATIC-NEXT: movl ptr, %edx
-; LINUX-32-STATIC-NEXT: movl %ecx, (%edx,%eax,4)
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl src(,[[EAX]],4), [[ECX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl ptr, [[EDX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4)
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: ind02:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: movl src(,%eax,4), %ecx
-; LINUX-32-PIC-NEXT: movl ptr, %edx
-; LINUX-32-PIC-NEXT: movl %ecx, (%edx,%eax,4)
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl src(,[[EAX]],4), [[ECX:%e.x]]
+; LINUX-32-PIC-NEXT: movl ptr, [[EDX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4)
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: ind02:
-; LINUX-64-PIC: movq src@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: movl (%rax,%rdi,4), %eax
-; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), %rcx
-; LINUX-64-PIC-NEXT: movq (%rcx), %rcx
-; LINUX-64-PIC-NEXT: movl %eax, (%rcx,%rdi,4)
+; LINUX-64-PIC: movq src@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
+; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _ind02:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: movl _src(,%eax,4), %ecx
-; DARWIN-32-STATIC-NEXT: movl _ptr, %edx
-; DARWIN-32-STATIC-NEXT: movl %ecx, (%edx,%eax,4)
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl _src(,[[EAX]],4), [[ECX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl _ptr, [[EDX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4)
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _ind02:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl L_src$non_lazy_ptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl (%ecx,%eax,4), %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, %edx
-; DARWIN-32-DYNAMIC-NEXT: movl (%edx), %edx
-; DARWIN-32-DYNAMIC-NEXT: movl %ecx, (%edx,%eax,4)
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_src$non_lazy_ptr, [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl ([[ECX]],[[EAX]],4), [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[EDX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl ([[EDX]]), [[EDX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4)
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _ind02:
; DARWIN-32-PIC: calll L28$pb
; DARWIN-32-PIC-NEXT: L28$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L28$pb(%eax), %edx
-; DARWIN-32-PIC-NEXT: movl (%edx,%ecx,4), %edx
-; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L28$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: movl (%eax), %eax
-; DARWIN-32-PIC-NEXT: movl %edx, (%eax,%ecx,4)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L28$pb([[EAX]]), [[EDX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl ([[EDX]],[[ECX]],4), [[EDX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L28$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl ([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[EDX]], ([[EAX]],[[ECX]],4)
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _ind02:
-; DARWIN-64-STATIC: movq _src@GOTPCREL(%rip), %rax
-; DARWIN-64-STATIC-NEXT: movl (%rax,%rdi,4), %eax
-; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-STATIC-NEXT: movq (%rcx), %rcx
-; DARWIN-64-STATIC-NEXT: movl %eax, (%rcx,%rdi,4)
+; DARWIN-64-STATIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _ind02:
-; DARWIN-64-DYNAMIC: movq _src@GOTPCREL(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: movl (%rax,%rdi,4), %eax
-; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movq (%rcx), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movl %eax, (%rcx,%rdi,4)
+; DARWIN-64-DYNAMIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _ind02:
-; DARWIN-64-PIC: movq _src@GOTPCREL(%rip), %rax
-; DARWIN-64-PIC-NEXT: movl (%rax,%rdi,4), %eax
-; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-PIC-NEXT: movq (%rcx), %rcx
-; DARWIN-64-PIC-NEXT: movl %eax, (%rcx,%rdi,4)
+; DARWIN-64-PIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; DARWIN-64-PIC-NEXT: ret
}
@@ -2046,83 +2057,83 @@ entry:
store i32 %2, i32* %3, align 4
ret void
; LINUX-64-STATIC: ixd02:
-; LINUX-64-STATIC: movl xsrc(,%rdi,4), %eax
-; LINUX-64-STATIC: movq ptr(%rip), %rcx
-; LINUX-64-STATIC: movl %eax, (%rcx,%rdi,4)
+; LINUX-64-STATIC: movl xsrc(,%rdi,4), [[EAX:%e.x]]
+; LINUX-64-STATIC: movq ptr(%rip), [[RCX:%r.x]]
+; LINUX-64-STATIC: movl [[EAX]], ([[RCX]],%rdi,4)
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: ixd02:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: movl xsrc(,%eax,4), %ecx
-; LINUX-32-STATIC-NEXT: movl ptr, %edx
-; LINUX-32-STATIC-NEXT: movl %ecx, (%edx,%eax,4)
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl xsrc(,[[EAX]],4), [[ECX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl ptr, [[EDX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4)
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: ixd02:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: movl xsrc(,%eax,4), %ecx
-; LINUX-32-PIC-NEXT: movl ptr, %edx
-; LINUX-32-PIC-NEXT: movl %ecx, (%edx,%eax,4)
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl xsrc(,[[EAX]],4), [[ECX:%e.x]]
+; LINUX-32-PIC-NEXT: movl ptr, [[EDX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4)
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: ixd02:
-; LINUX-64-PIC: movq xsrc@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: movl (%rax,%rdi,4), %eax
-; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), %rcx
-; LINUX-64-PIC-NEXT: movq (%rcx), %rcx
-; LINUX-64-PIC-NEXT: movl %eax, (%rcx,%rdi,4)
+; LINUX-64-PIC: movq xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
+; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _ixd02:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: movl _xsrc(,%eax,4), %ecx
-; DARWIN-32-STATIC-NEXT: movl _ptr, %edx
-; DARWIN-32-STATIC-NEXT: movl %ecx, (%edx,%eax,4)
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl _xsrc(,[[EAX]],4), [[ECX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl _ptr, [[EDX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4)
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _ixd02:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl L_xsrc$non_lazy_ptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl (%ecx,%eax,4), %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, %edx
-; DARWIN-32-DYNAMIC-NEXT: movl (%edx), %edx
-; DARWIN-32-DYNAMIC-NEXT: movl %ecx, (%edx,%eax,4)
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_xsrc$non_lazy_ptr, [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl ([[ECX]],[[EAX]],4), [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[EDX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl ([[EDX]]), [[EDX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4)
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _ixd02:
; DARWIN-32-PIC: calll L29$pb
; DARWIN-32-PIC-NEXT: L29$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L29$pb(%eax), %edx
-; DARWIN-32-PIC-NEXT: movl (%edx,%ecx,4), %edx
-; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L29$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: movl (%eax), %eax
-; DARWIN-32-PIC-NEXT: movl %edx, (%eax,%ecx,4)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L29$pb([[EAX]]), [[EDX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl ([[EDX]],[[ECX]],4), [[EDX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L29$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl ([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[EDX]], ([[EAX]],[[ECX]],4)
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _ixd02:
-; DARWIN-64-STATIC: movq _xsrc@GOTPCREL(%rip), %rax
-; DARWIN-64-STATIC-NEXT: movl (%rax,%rdi,4), %eax
-; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-STATIC-NEXT: movq (%rcx), %rcx
-; DARWIN-64-STATIC-NEXT: movl %eax, (%rcx,%rdi,4)
+; DARWIN-64-STATIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _ixd02:
-; DARWIN-64-DYNAMIC: movq _xsrc@GOTPCREL(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: movl (%rax,%rdi,4), %eax
-; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movq (%rcx), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movl %eax, (%rcx,%rdi,4)
+; DARWIN-64-DYNAMIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _ixd02:
-; DARWIN-64-PIC: movq _xsrc@GOTPCREL(%rip), %rax
-; DARWIN-64-PIC-NEXT: movl (%rax,%rdi,4), %eax
-; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-PIC-NEXT: movq (%rcx), %rcx
-; DARWIN-64-PIC-NEXT: movl %eax, (%rcx,%rdi,4)
+; DARWIN-64-PIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; DARWIN-64-PIC-NEXT: ret
}
@@ -2134,69 +2145,69 @@ entry:
store i32 %1, i32* %2, align 4
ret void
; LINUX-64-STATIC: ind03:
-; LINUX-64-STATIC: movl dsrc(,%rdi,4), %eax
-; LINUX-64-STATIC: movl %eax, ddst(,%rdi,4)
+; LINUX-64-STATIC: movl dsrc(,%rdi,4), [[EAX:%e.x]]
+; LINUX-64-STATIC: movl [[EAX]], ddst(,%rdi,4)
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: ind03:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: movl dsrc(,%eax,4), %ecx
-; LINUX-32-STATIC-NEXT: movl %ecx, ddst(,%eax,4)
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl dsrc(,[[EAX]],4), [[ECX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[ECX]], ddst(,[[EAX]],4)
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: ind03:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: movl dsrc(,%eax,4), %ecx
-; LINUX-32-PIC-NEXT: movl %ecx, ddst(,%eax,4)
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl dsrc(,[[EAX]],4), [[ECX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[ECX]], ddst(,[[EAX]],4)
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: ind03:
-; LINUX-64-PIC: movq dsrc@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: movl (%rax,%rdi,4), %eax
-; LINUX-64-PIC-NEXT: movq ddst@GOTPCREL(%rip), %rcx
-; LINUX-64-PIC-NEXT: movl %eax, (%rcx,%rdi,4)
+; LINUX-64-PIC: movq dsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
+; LINUX-64-PIC-NEXT: movq ddst@GOTPCREL(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _ind03:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: movl _dsrc(,%eax,4), %ecx
-; DARWIN-32-STATIC-NEXT: movl %ecx, _ddst(,%eax,4)
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl _dsrc(,[[EAX]],4), [[ECX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[ECX]], _ddst(,[[EAX]],4)
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _ind03:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl _dsrc(,%eax,4), %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl %ecx, _ddst(,%eax,4)
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl _dsrc(,[[EAX]],4), [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], _ddst(,[[EAX]],4)
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _ind03:
; DARWIN-32-PIC: calll L30$pb
; DARWIN-32-PIC-NEXT: L30$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: movl _dsrc-L30$pb(%eax,%ecx,4), %edx
-; DARWIN-32-PIC-NEXT: movl %edx, _ddst-L30$pb(%eax,%ecx,4)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl _dsrc-L30$pb([[EAX]],[[ECX]],4), [[EDX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[EDX]], _ddst-L30$pb([[EAX]],[[ECX]],4)
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _ind03:
-; DARWIN-64-STATIC: leaq _dsrc(%rip), %rax
-; DARWIN-64-STATIC-NEXT: movl (%rax,%rdi,4), %eax
-; DARWIN-64-STATIC-NEXT: leaq _ddst(%rip), %rcx
-; DARWIN-64-STATIC-NEXT: movl %eax, (%rcx,%rdi,4)
+; DARWIN-64-STATIC: leaq _dsrc(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-STATIC-NEXT: leaq _ddst(%rip), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _ind03:
-; DARWIN-64-DYNAMIC: leaq _dsrc(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: movl (%rax,%rdi,4), %eax
-; DARWIN-64-DYNAMIC-NEXT: leaq _ddst(%rip), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movl %eax, (%rcx,%rdi,4)
+; DARWIN-64-DYNAMIC: leaq _dsrc(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-DYNAMIC-NEXT: leaq _ddst(%rip), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _ind03:
-; DARWIN-64-PIC: leaq _dsrc(%rip), %rax
-; DARWIN-64-PIC-NEXT: movl (%rax,%rdi,4), %eax
-; DARWIN-64-PIC-NEXT: leaq _ddst(%rip), %rcx
-; DARWIN-64-PIC-NEXT: movl %eax, (%rcx,%rdi,4)
+; DARWIN-64-PIC: leaq _dsrc(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-PIC-NEXT: leaq _ddst(%rip), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; DARWIN-64-PIC-NEXT: ret
}
@@ -2206,66 +2217,66 @@ entry:
store i32* %0, i32** @dptr, align 8
ret void
; LINUX-64-STATIC: ind04:
-; LINUX-64-STATIC: leaq ddst(,%rdi,4), %rax
-; LINUX-64-STATIC: movq %rax, dptr
+; LINUX-64-STATIC: leaq ddst(,%rdi,4), [[RAX:%r.x]]
+; LINUX-64-STATIC: movq [[RAX]], dptr
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: ind04:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: leal ddst(,%eax,4), %eax
-; LINUX-32-STATIC-NEXT: movl %eax, dptr
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: leal ddst(,[[EAX]],4), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[EAX]], dptr
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: ind04:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: leal ddst(,%eax,4), %eax
-; LINUX-32-PIC-NEXT: movl %eax, dptr
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: leal ddst(,[[EAX]],4), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[EAX]], dptr
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: ind04:
; LINUX-64-PIC: shlq $2, %rdi
; LINUX-64-PIC-NEXT: addq ddst@GOTPCREL(%rip), %rdi
-; LINUX-64-PIC-NEXT: movq dptr@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: movq %rdi, (%rax)
+; LINUX-64-PIC-NEXT: movq dptr@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movq %rdi, ([[RAX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _ind04:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: leal _ddst(,%eax,4), %eax
-; DARWIN-32-STATIC-NEXT: movl %eax, _dptr
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: leal _ddst(,[[EAX]],4), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[EAX]], _dptr
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _ind04:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: leal _ddst(,%eax,4), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl %eax, _dptr
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: leal _ddst(,[[EAX]],4), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], _dptr
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _ind04:
; DARWIN-32-PIC: calll L31$pb
; DARWIN-32-PIC-NEXT: L31$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: leal _ddst-L31$pb(%eax,%ecx,4), %ecx
-; DARWIN-32-PIC-NEXT: movl %ecx, _dptr-L31$pb(%eax)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal _ddst-L31$pb([[EAX]],[[ECX]],4), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[ECX]], _dptr-L31$pb([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _ind04:
-; DARWIN-64-STATIC: leaq _ddst(%rip), %rax
-; DARWIN-64-STATIC-NEXT: leaq (%rax,%rdi,4), %rax
-; DARWIN-64-STATIC-NEXT: movq %rax, _dptr(%rip)
+; DARWIN-64-STATIC: leaq _ddst(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: leaq ([[RAX]],%rdi,4), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movq [[RAX]], _dptr(%rip)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _ind04:
-; DARWIN-64-DYNAMIC: leaq _ddst(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: leaq (%rax,%rdi,4), %rax
-; DARWIN-64-DYNAMIC-NEXT: movq %rax, _dptr(%rip)
+; DARWIN-64-DYNAMIC: leaq _ddst(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: leaq ([[RAX]],%rdi,4), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], _dptr(%rip)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _ind04:
-; DARWIN-64-PIC: leaq _ddst(%rip), %rax
-; DARWIN-64-PIC-NEXT: leaq (%rax,%rdi,4), %rax
-; DARWIN-64-PIC-NEXT: movq %rax, _dptr(%rip)
+; DARWIN-64-PIC: leaq _ddst(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: leaq ([[RAX]],%rdi,4), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movq [[RAX]], _dptr(%rip)
; DARWIN-64-PIC-NEXT: ret
}
@@ -2278,76 +2289,76 @@ entry:
store i32 %2, i32* %3, align 4
ret void
; LINUX-64-STATIC: ind05:
-; LINUX-64-STATIC: movl dsrc(,%rdi,4), %eax
-; LINUX-64-STATIC: movq dptr(%rip), %rcx
-; LINUX-64-STATIC: movl %eax, (%rcx,%rdi,4)
+; LINUX-64-STATIC: movl dsrc(,%rdi,4), [[EAX:%e.x]]
+; LINUX-64-STATIC: movq dptr(%rip), [[RCX:%r.x]]
+; LINUX-64-STATIC: movl [[EAX]], ([[RCX]],%rdi,4)
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: ind05:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: movl dsrc(,%eax,4), %ecx
-; LINUX-32-STATIC-NEXT: movl dptr, %edx
-; LINUX-32-STATIC-NEXT: movl %ecx, (%edx,%eax,4)
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl dsrc(,[[EAX]],4), [[ECX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl dptr, [[EDX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4)
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: ind05:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: movl dsrc(,%eax,4), %ecx
-; LINUX-32-PIC-NEXT: movl dptr, %edx
-; LINUX-32-PIC-NEXT: movl %ecx, (%edx,%eax,4)
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl dsrc(,[[EAX]],4), [[ECX:%e.x]]
+; LINUX-32-PIC-NEXT: movl dptr, [[EDX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4)
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: ind05:
-; LINUX-64-PIC: movq dsrc@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: movl (%rax,%rdi,4), %eax
-; LINUX-64-PIC-NEXT: movq dptr@GOTPCREL(%rip), %rcx
-; LINUX-64-PIC-NEXT: movq (%rcx), %rcx
-; LINUX-64-PIC-NEXT: movl %eax, (%rcx,%rdi,4)
+; LINUX-64-PIC: movq dsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
+; LINUX-64-PIC-NEXT: movq dptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _ind05:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: movl _dsrc(,%eax,4), %ecx
-; DARWIN-32-STATIC-NEXT: movl _dptr, %edx
-; DARWIN-32-STATIC-NEXT: movl %ecx, (%edx,%eax,4)
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl _dsrc(,[[EAX]],4), [[ECX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl _dptr, [[EDX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4)
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _ind05:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl _dsrc(,%eax,4), %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl _dptr, %edx
-; DARWIN-32-DYNAMIC-NEXT: movl %ecx, (%edx,%eax,4)
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl _dsrc(,[[EAX]],4), [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl _dptr, [[EDX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4)
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _ind05:
; DARWIN-32-PIC: calll L32$pb
; DARWIN-32-PIC-NEXT: L32$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: movl _dsrc-L32$pb(%eax,%ecx,4), %edx
-; DARWIN-32-PIC-NEXT: movl _dptr-L32$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: movl %edx, (%eax,%ecx,4)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl _dsrc-L32$pb([[EAX]],[[ECX]],4), [[EDX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl _dptr-L32$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[EDX]], ([[EAX]],[[ECX]],4)
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _ind05:
-; DARWIN-64-STATIC: leaq _dsrc(%rip), %rax
-; DARWIN-64-STATIC-NEXT: movl (%rax,%rdi,4), %eax
-; DARWIN-64-STATIC-NEXT: movq _dptr(%rip), %rcx
-; DARWIN-64-STATIC-NEXT: movl %eax, (%rcx,%rdi,4)
+; DARWIN-64-STATIC: leaq _dsrc(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-STATIC-NEXT: movq _dptr(%rip), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _ind05:
-; DARWIN-64-DYNAMIC: leaq _dsrc(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: movl (%rax,%rdi,4), %eax
-; DARWIN-64-DYNAMIC-NEXT: movq _dptr(%rip), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movl %eax, (%rcx,%rdi,4)
+; DARWIN-64-DYNAMIC: leaq _dsrc(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq _dptr(%rip), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _ind05:
-; DARWIN-64-PIC: leaq _dsrc(%rip), %rax
-; DARWIN-64-PIC-NEXT: movl (%rax,%rdi,4), %eax
-; DARWIN-64-PIC-NEXT: movq _dptr(%rip), %rcx
-; DARWIN-64-PIC-NEXT: movl %eax, (%rcx,%rdi,4)
+; DARWIN-64-PIC: leaq _dsrc(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-PIC-NEXT: movq _dptr(%rip), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; DARWIN-64-PIC-NEXT: ret
}
@@ -2359,69 +2370,69 @@ entry:
store i32 %1, i32* %2, align 4
ret void
; LINUX-64-STATIC: ind06:
-; LINUX-64-STATIC: movl lsrc(,%rdi,4), %eax
-; LINUX-64-STATIC: movl %eax, ldst(,%rdi,4)
+; LINUX-64-STATIC: movl lsrc(,%rdi,4), [[EAX:%e.x]]
+; LINUX-64-STATIC: movl [[EAX]], ldst(,%rdi,4)
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: ind06:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: movl lsrc(,%eax,4), %ecx
-; LINUX-32-STATIC-NEXT: movl %ecx, ldst(,%eax,4)
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl lsrc(,[[EAX]],4), [[ECX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[ECX]], ldst(,[[EAX]],4)
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: ind06:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: movl lsrc(,%eax,4), %ecx
-; LINUX-32-PIC-NEXT: movl %ecx, ldst(,%eax,4)
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl lsrc(,[[EAX]],4), [[ECX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[ECX]], ldst(,[[EAX]],4)
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: ind06:
-; LINUX-64-PIC: leaq lsrc(%rip), %rax
-; LINUX-64-PIC-NEXT: movl (%rax,%rdi,4), %eax
-; LINUX-64-PIC-NEXT: leaq ldst(%rip), %rcx
-; LINUX-64-PIC-NEXT: movl %eax, (%rcx,%rdi,4)
+; LINUX-64-PIC: leaq lsrc(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
+; LINUX-64-PIC-NEXT: leaq ldst(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _ind06:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: movl _lsrc(,%eax,4), %ecx
-; DARWIN-32-STATIC-NEXT: movl %ecx, _ldst(,%eax,4)
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl _lsrc(,[[EAX]],4), [[ECX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[ECX]], _ldst(,[[EAX]],4)
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _ind06:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl _lsrc(,%eax,4), %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl %ecx, _ldst(,%eax,4)
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl _lsrc(,[[EAX]],4), [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], _ldst(,[[EAX]],4)
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _ind06:
; DARWIN-32-PIC: calll L33$pb
; DARWIN-32-PIC-NEXT: L33$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: movl _lsrc-L33$pb(%eax,%ecx,4), %edx
-; DARWIN-32-PIC-NEXT: movl %edx, _ldst-L33$pb(%eax,%ecx,4)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl _lsrc-L33$pb([[EAX]],[[ECX]],4), [[EDX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[EDX]], _ldst-L33$pb([[EAX]],[[ECX]],4)
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _ind06:
-; DARWIN-64-STATIC: leaq _lsrc(%rip), %rax
-; DARWIN-64-STATIC-NEXT: movl (%rax,%rdi,4), %eax
-; DARWIN-64-STATIC-NEXT: leaq _ldst(%rip), %rcx
-; DARWIN-64-STATIC-NEXT: movl %eax, (%rcx,%rdi,4)
+; DARWIN-64-STATIC: leaq _lsrc(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-STATIC-NEXT: leaq _ldst(%rip), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _ind06:
-; DARWIN-64-DYNAMIC: leaq _lsrc(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: movl (%rax,%rdi,4), %eax
-; DARWIN-64-DYNAMIC-NEXT: leaq _ldst(%rip), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movl %eax, (%rcx,%rdi,4)
+; DARWIN-64-DYNAMIC: leaq _lsrc(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-DYNAMIC-NEXT: leaq _ldst(%rip), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _ind06:
-; DARWIN-64-PIC: leaq _lsrc(%rip), %rax
-; DARWIN-64-PIC-NEXT: movl (%rax,%rdi,4), %eax
-; DARWIN-64-PIC-NEXT: leaq _ldst(%rip), %rcx
-; DARWIN-64-PIC-NEXT: movl %eax, (%rcx,%rdi,4)
+; DARWIN-64-PIC: leaq _lsrc(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-PIC-NEXT: leaq _ldst(%rip), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; DARWIN-64-PIC-NEXT: ret
}
@@ -2431,65 +2442,65 @@ entry:
store i32* %0, i32** @lptr, align 8
ret void
; LINUX-64-STATIC: ind07:
-; LINUX-64-STATIC: leaq ldst(,%rdi,4), %rax
-; LINUX-64-STATIC: movq %rax, lptr
+; LINUX-64-STATIC: leaq ldst(,%rdi,4), [[RAX:%r.x]]
+; LINUX-64-STATIC: movq [[RAX]], lptr
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: ind07:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: leal ldst(,%eax,4), %eax
-; LINUX-32-STATIC-NEXT: movl %eax, lptr
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: leal ldst(,[[EAX]],4), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[EAX]], lptr
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: ind07:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: leal ldst(,%eax,4), %eax
-; LINUX-32-PIC-NEXT: movl %eax, lptr
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: leal ldst(,[[EAX]],4), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[EAX]], lptr
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: ind07:
-; LINUX-64-PIC: leaq ldst(%rip), %rax
-; LINUX-64-PIC-NEXT: leaq (%rax,%rdi,4), %rax
-; LINUX-64-PIC-NEXT: movq %rax, lptr(%rip)
+; LINUX-64-PIC: leaq ldst(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: leaq ([[RAX]],%rdi,4), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movq [[RAX]], lptr(%rip)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _ind07:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: leal _ldst(,%eax,4), %eax
-; DARWIN-32-STATIC-NEXT: movl %eax, _lptr
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: leal _ldst(,[[EAX]],4), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[EAX]], _lptr
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _ind07:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: leal _ldst(,%eax,4), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl %eax, _lptr
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: leal _ldst(,[[EAX]],4), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], _lptr
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _ind07:
; DARWIN-32-PIC: calll L34$pb
; DARWIN-32-PIC-NEXT: L34$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: leal _ldst-L34$pb(%eax,%ecx,4), %ecx
-; DARWIN-32-PIC-NEXT: movl %ecx, _lptr-L34$pb(%eax)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal _ldst-L34$pb([[EAX]],[[ECX]],4), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[ECX]], _lptr-L34$pb([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _ind07:
-; DARWIN-64-STATIC: leaq _ldst(%rip), %rax
-; DARWIN-64-STATIC-NEXT: leaq (%rax,%rdi,4), %rax
-; DARWIN-64-STATIC-NEXT: movq %rax, _lptr(%rip)
+; DARWIN-64-STATIC: leaq _ldst(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: leaq ([[RAX]],%rdi,4), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movq [[RAX]], _lptr(%rip)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _ind07:
-; DARWIN-64-DYNAMIC: leaq _ldst(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: leaq (%rax,%rdi,4), %rax
-; DARWIN-64-DYNAMIC-NEXT: movq %rax, _lptr(%rip)
+; DARWIN-64-DYNAMIC: leaq _ldst(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: leaq ([[RAX]],%rdi,4), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], _lptr(%rip)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _ind07:
-; DARWIN-64-PIC: leaq _ldst(%rip), %rax
-; DARWIN-64-PIC-NEXT: leaq (%rax,%rdi,4), %rax
-; DARWIN-64-PIC-NEXT: movq %rax, _lptr(%rip)
+; DARWIN-64-PIC: leaq _ldst(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: leaq ([[RAX]],%rdi,4), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movq [[RAX]], _lptr(%rip)
; DARWIN-64-PIC-NEXT: ret
}
@@ -2502,75 +2513,75 @@ entry:
store i32 %2, i32* %3, align 4
ret void
; LINUX-64-STATIC: ind08:
-; LINUX-64-STATIC: movl lsrc(,%rdi,4), %eax
-; LINUX-64-STATIC: movq lptr(%rip), %rcx
-; LINUX-64-STATIC: movl %eax, (%rcx,%rdi,4)
+; LINUX-64-STATIC: movl lsrc(,%rdi,4), [[EAX:%e.x]]
+; LINUX-64-STATIC: movq lptr(%rip), [[RCX:%r.x]]
+; LINUX-64-STATIC: movl [[EAX]], ([[RCX]],%rdi,4)
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: ind08:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: movl lsrc(,%eax,4), %ecx
-; LINUX-32-STATIC-NEXT: movl lptr, %edx
-; LINUX-32-STATIC-NEXT: movl %ecx, (%edx,%eax,4)
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl lsrc(,[[EAX]],4), [[ECX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl lptr, [[EDX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4)
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: ind08:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: movl lsrc(,%eax,4), %ecx
-; LINUX-32-PIC-NEXT: movl lptr, %edx
-; LINUX-32-PIC-NEXT: movl %ecx, (%edx,%eax,4)
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl lsrc(,[[EAX]],4), [[ECX:%e.x]]
+; LINUX-32-PIC-NEXT: movl lptr, [[EDX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4)
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: ind08:
-; LINUX-64-PIC: leaq lsrc(%rip), %rax
-; LINUX-64-PIC-NEXT: movl (%rax,%rdi,4), %eax
-; LINUX-64-PIC-NEXT: movq lptr(%rip), %rcx
-; LINUX-64-PIC-NEXT: movl %eax, (%rcx,%rdi,4)
+; LINUX-64-PIC: leaq lsrc(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
+; LINUX-64-PIC-NEXT: movq lptr(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _ind08:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: movl _lsrc(,%eax,4), %ecx
-; DARWIN-32-STATIC-NEXT: movl _lptr, %edx
-; DARWIN-32-STATIC-NEXT: movl %ecx, (%edx,%eax,4)
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl _lsrc(,[[EAX]],4), [[ECX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl _lptr, [[EDX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4)
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _ind08:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl _lsrc(,%eax,4), %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl _lptr, %edx
-; DARWIN-32-DYNAMIC-NEXT: movl %ecx, (%edx,%eax,4)
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl _lsrc(,[[EAX]],4), [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl _lptr, [[EDX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4)
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _ind08:
; DARWIN-32-PIC: calll L35$pb
; DARWIN-32-PIC-NEXT: L35$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: movl _lsrc-L35$pb(%eax,%ecx,4), %edx
-; DARWIN-32-PIC-NEXT: movl _lptr-L35$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: movl %edx, (%eax,%ecx,4)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl _lsrc-L35$pb([[EAX]],[[ECX]],4), [[EDX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl _lptr-L35$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[EDX]], ([[EAX]],[[ECX]],4)
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _ind08:
-; DARWIN-64-STATIC: leaq _lsrc(%rip), %rax
-; DARWIN-64-STATIC-NEXT: movl (%rax,%rdi,4), %eax
-; DARWIN-64-STATIC-NEXT: movq _lptr(%rip), %rcx
-; DARWIN-64-STATIC-NEXT: movl %eax, (%rcx,%rdi,4)
+; DARWIN-64-STATIC: leaq _lsrc(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-STATIC-NEXT: movq _lptr(%rip), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _ind08:
-; DARWIN-64-DYNAMIC: leaq _lsrc(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: movl (%rax,%rdi,4), %eax
-; DARWIN-64-DYNAMIC-NEXT: movq _lptr(%rip), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movl %eax, (%rcx,%rdi,4)
+; DARWIN-64-DYNAMIC: leaq _lsrc(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq _lptr(%rip), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _ind08:
-; DARWIN-64-PIC: leaq _lsrc(%rip), %rax
-; DARWIN-64-PIC-NEXT: movl (%rax,%rdi,4), %eax
-; DARWIN-64-PIC-NEXT: movq _lptr(%rip), %rcx
-; DARWIN-64-PIC-NEXT: movl %eax, (%rcx,%rdi,4)
+; DARWIN-64-PIC: leaq _lsrc(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-PIC-NEXT: movq _lptr(%rip), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; DARWIN-64-PIC-NEXT: ret
}
@@ -2583,73 +2594,73 @@ entry:
store i32 %2, i32* %3, align 4
ret void
; LINUX-64-STATIC: off00:
-; LINUX-64-STATIC: movl src+64(,%rdi,4), %eax
-; LINUX-64-STATIC: movl %eax, dst+64(,%rdi,4)
+; LINUX-64-STATIC: movl src+64(,%rdi,4), [[EAX:%e.x]]
+; LINUX-64-STATIC: movl [[EAX]], dst+64(,%rdi,4)
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: off00:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: movl src+64(,%eax,4), %ecx
-; LINUX-32-STATIC-NEXT: movl %ecx, dst+64(,%eax,4)
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl src+64(,[[EAX]],4), [[ECX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[ECX]], dst+64(,[[EAX]],4)
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: off00:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: movl src+64(,%eax,4), %ecx
-; LINUX-32-PIC-NEXT: movl %ecx, dst+64(,%eax,4)
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl src+64(,[[EAX]],4), [[ECX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[ECX]], dst+64(,[[EAX]],4)
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: off00:
-; LINUX-64-PIC: movq src@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: movl 64(%rax,%rdi,4), %eax
-; LINUX-64-PIC-NEXT: movq dst@GOTPCREL(%rip), %rcx
-; LINUX-64-PIC-NEXT: movl %eax, 64(%rcx,%rdi,4)
+; LINUX-64-PIC: movq src@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
+; LINUX-64-PIC-NEXT: movq dst@GOTPCREL(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _off00:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: movl _src+64(,%eax,4), %ecx
-; DARWIN-32-STATIC-NEXT: movl %ecx, _dst+64(,%eax,4)
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl _src+64(,[[EAX]],4), [[ECX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[ECX]], _dst+64(,[[EAX]],4)
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _off00:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl L_src$non_lazy_ptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl 64(%ecx,%eax,4), %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl L_dst$non_lazy_ptr, %edx
-; DARWIN-32-DYNAMIC-NEXT: movl %ecx, 64(%edx,%eax,4)
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_src$non_lazy_ptr, [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl 64([[ECX]],[[EAX]],4), [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_dst$non_lazy_ptr, [[EDX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], 64([[EDX]],[[EAX]],4)
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _off00:
; DARWIN-32-PIC: calll L36$pb
; DARWIN-32-PIC-NEXT: L36$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L36$pb(%eax), %edx
-; DARWIN-32-PIC-NEXT: movl 64(%edx,%ecx,4), %edx
-; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L36$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: movl %edx, 64(%eax,%ecx,4)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L36$pb([[EAX]]), [[EDX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 64([[EDX]],[[ECX]],4), [[EDX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L36$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[EDX]], 64([[EAX]],[[ECX]],4)
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _off00:
-; DARWIN-64-STATIC: movq _src@GOTPCREL(%rip), %rax
-; DARWIN-64-STATIC-NEXT: movl 64(%rax,%rdi,4), %eax
-; DARWIN-64-STATIC-NEXT: movq _dst@GOTPCREL(%rip), %rcx
-; DARWIN-64-STATIC-NEXT: movl %eax, 64(%rcx,%rdi,4)
+; DARWIN-64-STATIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-STATIC-NEXT: movq _dst@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _off00:
-; DARWIN-64-DYNAMIC: movq _src@GOTPCREL(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: movl 64(%rax,%rdi,4), %eax
-; DARWIN-64-DYNAMIC-NEXT: movq _dst@GOTPCREL(%rip), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movl %eax, 64(%rcx,%rdi,4)
+; DARWIN-64-DYNAMIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq _dst@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _off00:
-; DARWIN-64-PIC: movq _src@GOTPCREL(%rip), %rax
-; DARWIN-64-PIC-NEXT: movl 64(%rax,%rdi,4), %eax
-; DARWIN-64-PIC-NEXT: movq _dst@GOTPCREL(%rip), %rcx
-; DARWIN-64-PIC-NEXT: movl %eax, 64(%rcx,%rdi,4)
+; DARWIN-64-PIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-PIC-NEXT: movq _dst@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; DARWIN-64-PIC-NEXT: ret
}
@@ -2662,73 +2673,73 @@ entry:
store i32 %2, i32* %3, align 4
ret void
; LINUX-64-STATIC: oxf00:
-; LINUX-64-STATIC: movl xsrc+64(,%rdi,4), %eax
-; LINUX-64-STATIC: movl %eax, xdst+64(,%rdi,4)
+; LINUX-64-STATIC: movl xsrc+64(,%rdi,4), [[EAX:%e.x]]
+; LINUX-64-STATIC: movl [[EAX]], xdst+64(,%rdi,4)
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: oxf00:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: movl xsrc+64(,%eax,4), %ecx
-; LINUX-32-STATIC-NEXT: movl %ecx, xdst+64(,%eax,4)
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl xsrc+64(,[[EAX]],4), [[ECX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[ECX]], xdst+64(,[[EAX]],4)
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: oxf00:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: movl xsrc+64(,%eax,4), %ecx
-; LINUX-32-PIC-NEXT: movl %ecx, xdst+64(,%eax,4)
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl xsrc+64(,[[EAX]],4), [[ECX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[ECX]], xdst+64(,[[EAX]],4)
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: oxf00:
-; LINUX-64-PIC: movq xsrc@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: movl 64(%rax,%rdi,4), %eax
-; LINUX-64-PIC-NEXT: movq xdst@GOTPCREL(%rip), %rcx
-; LINUX-64-PIC-NEXT: movl %eax, 64(%rcx,%rdi,4)
+; LINUX-64-PIC: movq xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
+; LINUX-64-PIC-NEXT: movq xdst@GOTPCREL(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _oxf00:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: movl _xsrc+64(,%eax,4), %ecx
-; DARWIN-32-STATIC-NEXT: movl %ecx, _xdst+64(,%eax,4)
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl _xsrc+64(,[[EAX]],4), [[ECX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[ECX]], _xdst+64(,[[EAX]],4)
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _oxf00:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl L_xsrc$non_lazy_ptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl 64(%ecx,%eax,4), %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl L_xdst$non_lazy_ptr, %edx
-; DARWIN-32-DYNAMIC-NEXT: movl %ecx, 64(%edx,%eax,4)
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_xsrc$non_lazy_ptr, [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl 64([[ECX]],[[EAX]],4), [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_xdst$non_lazy_ptr, [[EDX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], 64([[EDX]],[[EAX]],4)
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _oxf00:
; DARWIN-32-PIC: calll L37$pb
; DARWIN-32-PIC-NEXT: L37$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L37$pb(%eax), %edx
-; DARWIN-32-PIC-NEXT: movl 64(%edx,%ecx,4), %edx
-; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L37$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: movl %edx, 64(%eax,%ecx,4)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L37$pb([[EAX]]), [[EDX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 64([[EDX]],[[ECX]],4), [[EDX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L37$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[EDX]], 64([[EAX]],[[ECX]],4)
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _oxf00:
-; DARWIN-64-STATIC: movq _xsrc@GOTPCREL(%rip), %rax
-; DARWIN-64-STATIC-NEXT: movl 64(%rax,%rdi,4), %eax
-; DARWIN-64-STATIC-NEXT: movq _xdst@GOTPCREL(%rip), %rcx
-; DARWIN-64-STATIC-NEXT: movl %eax, 64(%rcx,%rdi,4)
+; DARWIN-64-STATIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-STATIC-NEXT: movq _xdst@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _oxf00:
-; DARWIN-64-DYNAMIC: movq _xsrc@GOTPCREL(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: movl 64(%rax,%rdi,4), %eax
-; DARWIN-64-DYNAMIC-NEXT: movq _xdst@GOTPCREL(%rip), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movl %eax, 64(%rcx,%rdi,4)
+; DARWIN-64-DYNAMIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq _xdst@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _oxf00:
-; DARWIN-64-PIC: movq _xsrc@GOTPCREL(%rip), %rax
-; DARWIN-64-PIC-NEXT: movl 64(%rax,%rdi,4), %eax
-; DARWIN-64-PIC-NEXT: movq _xdst@GOTPCREL(%rip), %rcx
-; DARWIN-64-PIC-NEXT: movl %eax, 64(%rcx,%rdi,4)
+; DARWIN-64-PIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-PIC-NEXT: movq _xdst@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; DARWIN-64-PIC-NEXT: ret
}
@@ -2739,73 +2750,73 @@ entry:
store i32* %0, i32** @ptr, align 8
ret void
; LINUX-64-STATIC: off01:
-; LINUX-64-STATIC: leaq dst+64(,%rdi,4), %rax
-; LINUX-64-STATIC: movq %rax, ptr
+; LINUX-64-STATIC: leaq dst+64(,%rdi,4), [[RAX:%r.x]]
+; LINUX-64-STATIC: movq [[RAX]], ptr
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: off01:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: leal dst+64(,%eax,4), %eax
-; LINUX-32-STATIC-NEXT: movl %eax, ptr
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: leal dst+64(,[[EAX]],4), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[EAX]], ptr
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: off01:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: leal dst+64(,%eax,4), %eax
-; LINUX-32-PIC-NEXT: movl %eax, ptr
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: leal dst+64(,[[EAX]],4), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[EAX]], ptr
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: off01:
-; LINUX-64-PIC: movq dst@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax
-; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), %rcx
-; LINUX-64-PIC-NEXT: movq %rax, (%rcx)
+; LINUX-64-PIC: movq dst@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movq [[RAX]], ([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _off01:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: leal _dst+64(,%eax,4), %eax
-; DARWIN-32-STATIC-NEXT: movl %eax, _ptr
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: leal _dst+64(,[[EAX]],4), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[EAX]], _ptr
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _off01:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl L_dst$non_lazy_ptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: leal 64(%ecx,%eax,4), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl %eax, (%ecx)
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_dst$non_lazy_ptr, [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: leal 64([[ECX]],[[EAX]],4), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], ([[ECX]])
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _off01:
; DARWIN-32-PIC: calll L38$pb
; DARWIN-32-PIC-NEXT: L38$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L38$pb(%eax), %edx
-; DARWIN-32-PIC-NEXT: leal 64(%edx,%ecx,4), %ecx
-; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L38$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: movl %ecx, (%eax)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L38$pb([[EAX]]), [[EDX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal 64([[EDX]],[[ECX]],4), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L38$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[ECX]], ([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _off01:
-; DARWIN-64-STATIC: movq _dst@GOTPCREL(%rip), %rax
-; DARWIN-64-STATIC-NEXT: leaq 64(%rax,%rdi,4), %rax
-; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-STATIC-NEXT: movq %rax, (%rcx)
+; DARWIN-64-STATIC: movq _dst@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: leaq 64([[RAX]],%rdi,4), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movq [[RAX]], ([[RCX]])
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _off01:
-; DARWIN-64-DYNAMIC: movq _dst@GOTPCREL(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: leaq 64(%rax,%rdi,4), %rax
-; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movq %rax, (%rcx)
+; DARWIN-64-DYNAMIC: movq _dst@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: leaq 64([[RAX]],%rdi,4), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], ([[RCX]])
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _off01:
-; DARWIN-64-PIC: movq _dst@GOTPCREL(%rip), %rax
-; DARWIN-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax
-; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-PIC-NEXT: movq %rax, (%rcx)
+; DARWIN-64-PIC: movq _dst@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movq [[RAX]], ([[RCX]])
; DARWIN-64-PIC-NEXT: ret
}
@@ -2816,73 +2827,73 @@ entry:
store i32* %0, i32** @ptr, align 8
ret void
; LINUX-64-STATIC: oxf01:
-; LINUX-64-STATIC: leaq xdst+64(,%rdi,4), %rax
-; LINUX-64-STATIC: movq %rax, ptr
+; LINUX-64-STATIC: leaq xdst+64(,%rdi,4), [[RAX:%r.x]]
+; LINUX-64-STATIC: movq [[RAX]], ptr
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: oxf01:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: leal xdst+64(,%eax,4), %eax
-; LINUX-32-STATIC-NEXT: movl %eax, ptr
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: leal xdst+64(,[[EAX]],4), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[EAX]], ptr
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: oxf01:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: leal xdst+64(,%eax,4), %eax
-; LINUX-32-PIC-NEXT: movl %eax, ptr
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: leal xdst+64(,[[EAX]],4), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[EAX]], ptr
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: oxf01:
-; LINUX-64-PIC: movq xdst@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax
-; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), %rcx
-; LINUX-64-PIC-NEXT: movq %rax, (%rcx)
+; LINUX-64-PIC: movq xdst@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movq [[RAX]], ([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _oxf01:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: leal _xdst+64(,%eax,4), %eax
-; DARWIN-32-STATIC-NEXT: movl %eax, _ptr
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: leal _xdst+64(,[[EAX]],4), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[EAX]], _ptr
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _oxf01:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl L_xdst$non_lazy_ptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: leal 64(%ecx,%eax,4), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl %eax, (%ecx)
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_xdst$non_lazy_ptr, [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: leal 64([[ECX]],[[EAX]],4), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], ([[ECX]])
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _oxf01:
; DARWIN-32-PIC: calll L39$pb
; DARWIN-32-PIC-NEXT: L39$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L39$pb(%eax), %edx
-; DARWIN-32-PIC-NEXT: leal 64(%edx,%ecx,4), %ecx
-; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L39$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: movl %ecx, (%eax)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L39$pb([[EAX]]), [[EDX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal 64([[EDX]],[[ECX]],4), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L39$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[ECX]], ([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _oxf01:
-; DARWIN-64-STATIC: movq _xdst@GOTPCREL(%rip), %rax
-; DARWIN-64-STATIC-NEXT: leaq 64(%rax,%rdi,4), %rax
-; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-STATIC-NEXT: movq %rax, (%rcx)
+; DARWIN-64-STATIC: movq _xdst@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: leaq 64([[RAX]],%rdi,4), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movq [[RAX]], ([[RCX]])
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _oxf01:
-; DARWIN-64-DYNAMIC: movq _xdst@GOTPCREL(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: leaq 64(%rax,%rdi,4), %rax
-; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movq %rax, (%rcx)
+; DARWIN-64-DYNAMIC: movq _xdst@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: leaq 64([[RAX]],%rdi,4), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], ([[RCX]])
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _oxf01:
-; DARWIN-64-PIC: movq _xdst@GOTPCREL(%rip), %rax
-; DARWIN-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax
-; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-PIC-NEXT: movq %rax, (%rcx)
+; DARWIN-64-PIC: movq _xdst@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movq [[RAX]], ([[RCX]])
; DARWIN-64-PIC-NEXT: ret
}
@@ -2896,83 +2907,83 @@ entry:
store i32 %3, i32* %4, align 4
ret void
; LINUX-64-STATIC: off02:
-; LINUX-64-STATIC: movl src+64(,%rdi,4), %eax
-; LINUX-64-STATIC: movq ptr(%rip), %rcx
-; LINUX-64-STATIC: movl %eax, 64(%rcx,%rdi,4)
+; LINUX-64-STATIC: movl src+64(,%rdi,4), [[EAX:%e.x]]
+; LINUX-64-STATIC: movq ptr(%rip), [[RCX:%r.x]]
+; LINUX-64-STATIC: movl [[EAX]], 64([[RCX]],%rdi,4)
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: off02:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: movl src+64(,%eax,4), %ecx
-; LINUX-32-STATIC-NEXT: movl ptr, %edx
-; LINUX-32-STATIC-NEXT: movl %ecx, 64(%edx,%eax,4)
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl src+64(,[[EAX]],4), [[ECX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl ptr, [[EDX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[ECX]], 64([[EDX]],[[EAX]],4)
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: off02:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: movl src+64(,%eax,4), %ecx
-; LINUX-32-PIC-NEXT: movl ptr, %edx
-; LINUX-32-PIC-NEXT: movl %ecx, 64(%edx,%eax,4)
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl src+64(,[[EAX]],4), [[ECX:%e.x]]
+; LINUX-32-PIC-NEXT: movl ptr, [[EDX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[ECX]], 64([[EDX]],[[EAX]],4)
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: off02:
-; LINUX-64-PIC: movq src@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: movl 64(%rax,%rdi,4), %eax
-; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), %rcx
-; LINUX-64-PIC-NEXT: movq (%rcx), %rcx
-; LINUX-64-PIC-NEXT: movl %eax, 64(%rcx,%rdi,4)
+; LINUX-64-PIC: movq src@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
+; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _off02:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: movl _src+64(,%eax,4), %ecx
-; DARWIN-32-STATIC-NEXT: movl _ptr, %edx
-; DARWIN-32-STATIC-NEXT: movl %ecx, 64(%edx,%eax,4)
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl _src+64(,[[EAX]],4), [[ECX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl _ptr, [[EDX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[ECX]], 64([[EDX]],[[EAX]],4)
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _off02:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl L_src$non_lazy_ptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl 64(%ecx,%eax,4), %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, %edx
-; DARWIN-32-DYNAMIC-NEXT: movl (%edx), %edx
-; DARWIN-32-DYNAMIC-NEXT: movl %ecx, 64(%edx,%eax,4)
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_src$non_lazy_ptr, [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl 64([[ECX]],[[EAX]],4), [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[EDX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl ([[EDX]]), [[EDX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], 64([[EDX]],[[EAX]],4)
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _off02:
; DARWIN-32-PIC: calll L40$pb
; DARWIN-32-PIC-NEXT: L40$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L40$pb(%eax), %edx
-; DARWIN-32-PIC-NEXT: movl 64(%edx,%ecx,4), %edx
-; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L40$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: movl (%eax), %eax
-; DARWIN-32-PIC-NEXT: movl %edx, 64(%eax,%ecx,4)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L40$pb([[EAX]]), [[EDX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 64([[EDX]],[[ECX]],4), [[EDX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L40$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl ([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[EDX]], 64([[EAX]],[[ECX]],4)
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _off02:
-; DARWIN-64-STATIC: movq _src@GOTPCREL(%rip), %rax
-; DARWIN-64-STATIC-NEXT: movl 64(%rax,%rdi,4), %eax
-; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-STATIC-NEXT: movq (%rcx), %rcx
-; DARWIN-64-STATIC-NEXT: movl %eax, 64(%rcx,%rdi,4)
+; DARWIN-64-STATIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _off02:
-; DARWIN-64-DYNAMIC: movq _src@GOTPCREL(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: movl 64(%rax,%rdi,4), %eax
-; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movq (%rcx), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movl %eax, 64(%rcx,%rdi,4)
+; DARWIN-64-DYNAMIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _off02:
-; DARWIN-64-PIC: movq _src@GOTPCREL(%rip), %rax
-; DARWIN-64-PIC-NEXT: movl 64(%rax,%rdi,4), %eax
-; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-PIC-NEXT: movq (%rcx), %rcx
-; DARWIN-64-PIC-NEXT: movl %eax, 64(%rcx,%rdi,4)
+; DARWIN-64-PIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; DARWIN-64-PIC-NEXT: ret
}
@@ -2986,83 +2997,83 @@ entry:
store i32 %3, i32* %4, align 4
ret void
; LINUX-64-STATIC: oxf02:
-; LINUX-64-STATIC: movl xsrc+64(,%rdi,4), %eax
-; LINUX-64-STATIC: movq ptr(%rip), %rcx
-; LINUX-64-STATIC: movl %eax, 64(%rcx,%rdi,4)
+; LINUX-64-STATIC: movl xsrc+64(,%rdi,4), [[EAX:%e.x]]
+; LINUX-64-STATIC: movq ptr(%rip), [[RCX:%r.x]]
+; LINUX-64-STATIC: movl [[EAX]], 64([[RCX]],%rdi,4)
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: oxf02:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: movl xsrc+64(,%eax,4), %ecx
-; LINUX-32-STATIC-NEXT: movl ptr, %edx
-; LINUX-32-STATIC-NEXT: movl %ecx, 64(%edx,%eax,4)
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl xsrc+64(,[[EAX]],4), [[ECX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl ptr, [[EDX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[ECX]], 64([[EDX]],[[EAX]],4)
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: oxf02:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: movl xsrc+64(,%eax,4), %ecx
-; LINUX-32-PIC-NEXT: movl ptr, %edx
-; LINUX-32-PIC-NEXT: movl %ecx, 64(%edx,%eax,4)
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl xsrc+64(,[[EAX]],4), [[ECX:%e.x]]
+; LINUX-32-PIC-NEXT: movl ptr, [[EDX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[ECX]], 64([[EDX]],[[EAX]],4)
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: oxf02:
-; LINUX-64-PIC: movq xsrc@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: movl 64(%rax,%rdi,4), %eax
-; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), %rcx
-; LINUX-64-PIC-NEXT: movq (%rcx), %rcx
-; LINUX-64-PIC-NEXT: movl %eax, 64(%rcx,%rdi,4)
+; LINUX-64-PIC: movq xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
+; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _oxf02:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: movl _xsrc+64(,%eax,4), %ecx
-; DARWIN-32-STATIC-NEXT: movl _ptr, %edx
-; DARWIN-32-STATIC-NEXT: movl %ecx, 64(%edx,%eax,4)
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl _xsrc+64(,[[EAX]],4), [[ECX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl _ptr, [[EDX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[ECX]], 64([[EDX]],[[EAX]],4)
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _oxf02:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl L_xsrc$non_lazy_ptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl 64(%ecx,%eax,4), %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, %edx
-; DARWIN-32-DYNAMIC-NEXT: movl (%edx), %edx
-; DARWIN-32-DYNAMIC-NEXT: movl %ecx, 64(%edx,%eax,4)
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_xsrc$non_lazy_ptr, [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl 64([[ECX]],[[EAX]],4), [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[EDX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl ([[EDX]]), [[EDX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], 64([[EDX]],[[EAX]],4)
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _oxf02:
; DARWIN-32-PIC: calll L41$pb
; DARWIN-32-PIC-NEXT: L41$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L41$pb(%eax), %edx
-; DARWIN-32-PIC-NEXT: movl 64(%edx,%ecx,4), %edx
-; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L41$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: movl (%eax), %eax
-; DARWIN-32-PIC-NEXT: movl %edx, 64(%eax,%ecx,4)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L41$pb([[EAX]]), [[EDX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 64([[EDX]],[[ECX]],4), [[EDX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L41$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl ([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[EDX]], 64([[EAX]],[[ECX]],4)
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _oxf02:
-; DARWIN-64-STATIC: movq _xsrc@GOTPCREL(%rip), %rax
-; DARWIN-64-STATIC-NEXT: movl 64(%rax,%rdi,4), %eax
-; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-STATIC-NEXT: movq (%rcx), %rcx
-; DARWIN-64-STATIC-NEXT: movl %eax, 64(%rcx,%rdi,4)
+; DARWIN-64-STATIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _oxf02:
-; DARWIN-64-DYNAMIC: movq _xsrc@GOTPCREL(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: movl 64(%rax,%rdi,4), %eax
-; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movq (%rcx), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movl %eax, 64(%rcx,%rdi,4)
+; DARWIN-64-DYNAMIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _oxf02:
-; DARWIN-64-PIC: movq _xsrc@GOTPCREL(%rip), %rax
-; DARWIN-64-PIC-NEXT: movl 64(%rax,%rdi,4), %eax
-; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-PIC-NEXT: movq (%rcx), %rcx
-; DARWIN-64-PIC-NEXT: movl %eax, 64(%rcx,%rdi,4)
+; DARWIN-64-PIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; DARWIN-64-PIC-NEXT: ret
}
@@ -3075,69 +3086,69 @@ entry:
store i32 %2, i32* %3, align 4
ret void
; LINUX-64-STATIC: off03:
-; LINUX-64-STATIC: movl dsrc+64(,%rdi,4), %eax
-; LINUX-64-STATIC: movl %eax, ddst+64(,%rdi,4)
+; LINUX-64-STATIC: movl dsrc+64(,%rdi,4), [[EAX:%e.x]]
+; LINUX-64-STATIC: movl [[EAX]], ddst+64(,%rdi,4)
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: off03:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: movl dsrc+64(,%eax,4), %ecx
-; LINUX-32-STATIC-NEXT: movl %ecx, ddst+64(,%eax,4)
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl dsrc+64(,[[EAX]],4), [[ECX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[ECX]], ddst+64(,[[EAX]],4)
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: off03:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: movl dsrc+64(,%eax,4), %ecx
-; LINUX-32-PIC-NEXT: movl %ecx, ddst+64(,%eax,4)
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl dsrc+64(,[[EAX]],4), [[ECX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[ECX]], ddst+64(,[[EAX]],4)
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: off03:
-; LINUX-64-PIC: movq dsrc@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: movl 64(%rax,%rdi,4), %eax
-; LINUX-64-PIC-NEXT: movq ddst@GOTPCREL(%rip), %rcx
-; LINUX-64-PIC-NEXT: movl %eax, 64(%rcx,%rdi,4)
+; LINUX-64-PIC: movq dsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
+; LINUX-64-PIC-NEXT: movq ddst@GOTPCREL(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _off03:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: movl _dsrc+64(,%eax,4), %ecx
-; DARWIN-32-STATIC-NEXT: movl %ecx, _ddst+64(,%eax,4)
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl _dsrc+64(,[[EAX]],4), [[ECX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[ECX]], _ddst+64(,[[EAX]],4)
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _off03:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl _dsrc+64(,%eax,4), %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl %ecx, _ddst+64(,%eax,4)
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl _dsrc+64(,[[EAX]],4), [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], _ddst+64(,[[EAX]],4)
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _off03:
; DARWIN-32-PIC: calll L42$pb
; DARWIN-32-PIC-NEXT: L42$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: movl (_dsrc-L42$pb)+64(%eax,%ecx,4), %edx
-; DARWIN-32-PIC-NEXT: movl %edx, (_ddst-L42$pb)+64(%eax,%ecx,4)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl (_dsrc-L42$pb)+64([[EAX]],[[ECX]],4), [[EDX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[EDX]], (_ddst-L42$pb)+64([[EAX]],[[ECX]],4)
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _off03:
-; DARWIN-64-STATIC: leaq _dsrc(%rip), %rax
-; DARWIN-64-STATIC-NEXT: movl 64(%rax,%rdi,4), %eax
-; DARWIN-64-STATIC-NEXT: leaq _ddst(%rip), %rcx
-; DARWIN-64-STATIC-NEXT: movl %eax, 64(%rcx,%rdi,4)
+; DARWIN-64-STATIC: leaq _dsrc(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-STATIC-NEXT: leaq _ddst(%rip), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _off03:
-; DARWIN-64-DYNAMIC: leaq _dsrc(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: movl 64(%rax,%rdi,4), %eax
-; DARWIN-64-DYNAMIC-NEXT: leaq _ddst(%rip), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movl %eax, 64(%rcx,%rdi,4)
+; DARWIN-64-DYNAMIC: leaq _dsrc(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-DYNAMIC-NEXT: leaq _ddst(%rip), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _off03:
-; DARWIN-64-PIC: leaq _dsrc(%rip), %rax
-; DARWIN-64-PIC-NEXT: movl 64(%rax,%rdi,4), %eax
-; DARWIN-64-PIC-NEXT: leaq _ddst(%rip), %rcx
-; DARWIN-64-PIC-NEXT: movl %eax, 64(%rcx,%rdi,4)
+; DARWIN-64-PIC: leaq _dsrc(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-PIC-NEXT: leaq _ddst(%rip), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; DARWIN-64-PIC-NEXT: ret
}
@@ -3148,66 +3159,66 @@ entry:
store i32* %0, i32** @dptr, align 8
ret void
; LINUX-64-STATIC: off04:
-; LINUX-64-STATIC: leaq ddst+64(,%rdi,4), %rax
-; LINUX-64-STATIC: movq %rax, dptr
+; LINUX-64-STATIC: leaq ddst+64(,%rdi,4), [[RAX:%r.x]]
+; LINUX-64-STATIC: movq [[RAX]], dptr
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: off04:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: leal ddst+64(,%eax,4), %eax
-; LINUX-32-STATIC-NEXT: movl %eax, dptr
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: leal ddst+64(,[[EAX]],4), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[EAX]], dptr
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: off04:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: leal ddst+64(,%eax,4), %eax
-; LINUX-32-PIC-NEXT: movl %eax, dptr
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: leal ddst+64(,[[EAX]],4), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[EAX]], dptr
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: off04:
-; LINUX-64-PIC: movq ddst@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax
-; LINUX-64-PIC-NEXT: movq dptr@GOTPCREL(%rip), %rcx
-; LINUX-64-PIC-NEXT: movq %rax, (%rcx)
+; LINUX-64-PIC: movq ddst@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movq dptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movq [[RAX]], ([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _off04:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: leal _ddst+64(,%eax,4), %eax
-; DARWIN-32-STATIC-NEXT: movl %eax, _dptr
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: leal _ddst+64(,[[EAX]],4), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[EAX]], _dptr
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _off04:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: leal _ddst+64(,%eax,4), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl %eax, _dptr
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: leal _ddst+64(,[[EAX]],4), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], _dptr
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _off04:
; DARWIN-32-PIC: calll L43$pb
; DARWIN-32-PIC-NEXT: L43$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: leal (_ddst-L43$pb)+64(%eax,%ecx,4), %ecx
-; DARWIN-32-PIC-NEXT: movl %ecx, _dptr-L43$pb(%eax)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal (_ddst-L43$pb)+64([[EAX]],[[ECX]],4), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[ECX]], _dptr-L43$pb([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _off04:
-; DARWIN-64-STATIC: leaq _ddst(%rip), %rax
-; DARWIN-64-STATIC-NEXT: leaq 64(%rax,%rdi,4), %rax
-; DARWIN-64-STATIC-NEXT: movq %rax, _dptr(%rip)
+; DARWIN-64-STATIC: leaq _ddst(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: leaq 64([[RAX]],%rdi,4), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movq [[RAX]], _dptr(%rip)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _off04:
-; DARWIN-64-DYNAMIC: leaq _ddst(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: leaq 64(%rax,%rdi,4), %rax
-; DARWIN-64-DYNAMIC-NEXT: movq %rax, _dptr(%rip)
+; DARWIN-64-DYNAMIC: leaq _ddst(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: leaq 64([[RAX]],%rdi,4), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], _dptr(%rip)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _off04:
-; DARWIN-64-PIC: leaq _ddst(%rip), %rax
-; DARWIN-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax
-; DARWIN-64-PIC-NEXT: movq %rax, _dptr(%rip)
+; DARWIN-64-PIC: leaq _ddst(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movq [[RAX]], _dptr(%rip)
; DARWIN-64-PIC-NEXT: ret
}
@@ -3221,76 +3232,76 @@ entry:
store i32 %3, i32* %4, align 4
ret void
; LINUX-64-STATIC: off05:
-; LINUX-64-STATIC: movl dsrc+64(,%rdi,4), %eax
-; LINUX-64-STATIC: movq dptr(%rip), %rcx
-; LINUX-64-STATIC: movl %eax, 64(%rcx,%rdi,4)
+; LINUX-64-STATIC: movl dsrc+64(,%rdi,4), [[EAX:%e.x]]
+; LINUX-64-STATIC: movq dptr(%rip), [[RCX:%r.x]]
+; LINUX-64-STATIC: movl [[EAX]], 64([[RCX]],%rdi,4)
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: off05:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: movl dsrc+64(,%eax,4), %ecx
-; LINUX-32-STATIC-NEXT: movl dptr, %edx
-; LINUX-32-STATIC-NEXT: movl %ecx, 64(%edx,%eax,4)
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl dsrc+64(,[[EAX]],4), [[ECX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl dptr, [[EDX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[ECX]], 64([[EDX]],[[EAX]],4)
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: off05:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: movl dsrc+64(,%eax,4), %ecx
-; LINUX-32-PIC-NEXT: movl dptr, %edx
-; LINUX-32-PIC-NEXT: movl %ecx, 64(%edx,%eax,4)
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl dsrc+64(,[[EAX]],4), [[ECX:%e.x]]
+; LINUX-32-PIC-NEXT: movl dptr, [[EDX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[ECX]], 64([[EDX]],[[EAX]],4)
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: off05:
-; LINUX-64-PIC: movq dsrc@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: movl 64(%rax,%rdi,4), %eax
-; LINUX-64-PIC-NEXT: movq dptr@GOTPCREL(%rip), %rcx
-; LINUX-64-PIC-NEXT: movq (%rcx), %rcx
-; LINUX-64-PIC-NEXT: movl %eax, 64(%rcx,%rdi,4)
+; LINUX-64-PIC: movq dsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
+; LINUX-64-PIC-NEXT: movq dptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _off05:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: movl _dsrc+64(,%eax,4), %ecx
-; DARWIN-32-STATIC-NEXT: movl _dptr, %edx
-; DARWIN-32-STATIC-NEXT: movl %ecx, 64(%edx,%eax,4)
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl _dsrc+64(,[[EAX]],4), [[ECX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl _dptr, [[EDX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[ECX]], 64([[EDX]],[[EAX]],4)
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _off05:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl _dsrc+64(,%eax,4), %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl _dptr, %edx
-; DARWIN-32-DYNAMIC-NEXT: movl %ecx, 64(%edx,%eax,4)
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl _dsrc+64(,[[EAX]],4), [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl _dptr, [[EDX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], 64([[EDX]],[[EAX]],4)
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _off05:
; DARWIN-32-PIC: calll L44$pb
; DARWIN-32-PIC-NEXT: L44$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: movl (_dsrc-L44$pb)+64(%eax,%ecx,4), %edx
-; DARWIN-32-PIC-NEXT: movl _dptr-L44$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: movl %edx, 64(%eax,%ecx,4)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl (_dsrc-L44$pb)+64([[EAX]],[[ECX]],4), [[EDX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl _dptr-L44$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[EDX]], 64([[EAX]],[[ECX]],4)
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _off05:
-; DARWIN-64-STATIC: leaq _dsrc(%rip), %rax
-; DARWIN-64-STATIC-NEXT: movl 64(%rax,%rdi,4), %eax
-; DARWIN-64-STATIC-NEXT: movq _dptr(%rip), %rcx
-; DARWIN-64-STATIC-NEXT: movl %eax, 64(%rcx,%rdi,4)
+; DARWIN-64-STATIC: leaq _dsrc(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-STATIC-NEXT: movq _dptr(%rip), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _off05:
-; DARWIN-64-DYNAMIC: leaq _dsrc(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: movl 64(%rax,%rdi,4), %eax
-; DARWIN-64-DYNAMIC-NEXT: movq _dptr(%rip), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movl %eax, 64(%rcx,%rdi,4)
+; DARWIN-64-DYNAMIC: leaq _dsrc(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq _dptr(%rip), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _off05:
-; DARWIN-64-PIC: leaq _dsrc(%rip), %rax
-; DARWIN-64-PIC-NEXT: movl 64(%rax,%rdi,4), %eax
-; DARWIN-64-PIC-NEXT: movq _dptr(%rip), %rcx
-; DARWIN-64-PIC-NEXT: movl %eax, 64(%rcx,%rdi,4)
+; DARWIN-64-PIC: leaq _dsrc(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-PIC-NEXT: movq _dptr(%rip), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; DARWIN-64-PIC-NEXT: ret
}
@@ -3303,69 +3314,69 @@ entry:
store i32 %2, i32* %3, align 4
ret void
; LINUX-64-STATIC: off06:
-; LINUX-64-STATIC: movl lsrc+64(,%rdi,4), %eax
-; LINUX-64-STATIC: movl %eax, ldst+64(,%rdi,4)
+; LINUX-64-STATIC: movl lsrc+64(,%rdi,4), [[EAX:%e.x]]
+; LINUX-64-STATIC: movl [[EAX]], ldst+64(,%rdi,4)
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: off06:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: movl lsrc+64(,%eax,4), %ecx
-; LINUX-32-STATIC-NEXT: movl %ecx, ldst+64(,%eax,4)
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl lsrc+64(,[[EAX]],4), [[ECX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[ECX]], ldst+64(,[[EAX]],4)
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: off06:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: movl lsrc+64(,%eax,4), %ecx
-; LINUX-32-PIC-NEXT: movl %ecx, ldst+64(,%eax,4)
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl lsrc+64(,[[EAX]],4), [[ECX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[ECX]], ldst+64(,[[EAX]],4)
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: off06:
-; LINUX-64-PIC: leaq lsrc(%rip), %rax
-; LINUX-64-PIC-NEXT: movl 64(%rax,%rdi,4), %eax
-; LINUX-64-PIC-NEXT: leaq ldst(%rip), %rcx
-; LINUX-64-PIC-NEXT: movl %eax, 64(%rcx,%rdi,4)
+; LINUX-64-PIC: leaq lsrc(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
+; LINUX-64-PIC-NEXT: leaq ldst(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _off06:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: movl _lsrc+64(,%eax,4), %ecx
-; DARWIN-32-STATIC-NEXT: movl %ecx, _ldst+64(,%eax,4)
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl _lsrc+64(,[[EAX]],4), [[ECX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[ECX]], _ldst+64(,[[EAX]],4)
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _off06:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl _lsrc+64(,%eax,4), %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl %ecx, _ldst+64(,%eax,4)
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl _lsrc+64(,[[EAX]],4), [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], _ldst+64(,[[EAX]],4)
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _off06:
; DARWIN-32-PIC: calll L45$pb
; DARWIN-32-PIC-NEXT: L45$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: movl (_lsrc-L45$pb)+64(%eax,%ecx,4), %edx
-; DARWIN-32-PIC-NEXT: movl %edx, (_ldst-L45$pb)+64(%eax,%ecx,4)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl (_lsrc-L45$pb)+64([[EAX]],[[ECX]],4), [[EDX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[EDX]], (_ldst-L45$pb)+64([[EAX]],[[ECX]],4)
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _off06:
-; DARWIN-64-STATIC: leaq _lsrc(%rip), %rax
-; DARWIN-64-STATIC-NEXT: movl 64(%rax,%rdi,4), %eax
-; DARWIN-64-STATIC-NEXT: leaq _ldst(%rip), %rcx
-; DARWIN-64-STATIC-NEXT: movl %eax, 64(%rcx,%rdi,4)
+; DARWIN-64-STATIC: leaq _lsrc(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-STATIC-NEXT: leaq _ldst(%rip), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _off06:
-; DARWIN-64-DYNAMIC: leaq _lsrc(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: movl 64(%rax,%rdi,4), %eax
-; DARWIN-64-DYNAMIC-NEXT: leaq _ldst(%rip), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movl %eax, 64(%rcx,%rdi,4)
+; DARWIN-64-DYNAMIC: leaq _lsrc(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-DYNAMIC-NEXT: leaq _ldst(%rip), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _off06:
-; DARWIN-64-PIC: leaq _lsrc(%rip), %rax
-; DARWIN-64-PIC-NEXT: movl 64(%rax,%rdi,4), %eax
-; DARWIN-64-PIC-NEXT: leaq _ldst(%rip), %rcx
-; DARWIN-64-PIC-NEXT: movl %eax, 64(%rcx,%rdi,4)
+; DARWIN-64-PIC: leaq _lsrc(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-PIC-NEXT: leaq _ldst(%rip), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; DARWIN-64-PIC-NEXT: ret
}
@@ -3376,65 +3387,65 @@ entry:
store i32* %0, i32** @lptr, align 8
ret void
; LINUX-64-STATIC: off07:
-; LINUX-64-STATIC: leaq ldst+64(,%rdi,4), %rax
-; LINUX-64-STATIC: movq %rax, lptr
+; LINUX-64-STATIC: leaq ldst+64(,%rdi,4), [[RAX:%r.x]]
+; LINUX-64-STATIC: movq [[RAX]], lptr
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: off07:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: leal ldst+64(,%eax,4), %eax
-; LINUX-32-STATIC-NEXT: movl %eax, lptr
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: leal ldst+64(,[[EAX]],4), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[EAX]], lptr
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: off07:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: leal ldst+64(,%eax,4), %eax
-; LINUX-32-PIC-NEXT: movl %eax, lptr
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: leal ldst+64(,[[EAX]],4), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[EAX]], lptr
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: off07:
-; LINUX-64-PIC: leaq ldst(%rip), %rax
-; LINUX-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax
-; LINUX-64-PIC-NEXT: movq %rax, lptr(%rip)
+; LINUX-64-PIC: leaq ldst(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movq [[RAX]], lptr(%rip)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _off07:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: leal _ldst+64(,%eax,4), %eax
-; DARWIN-32-STATIC-NEXT: movl %eax, _lptr
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: leal _ldst+64(,[[EAX]],4), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[EAX]], _lptr
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _off07:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: leal _ldst+64(,%eax,4), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl %eax, _lptr
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: leal _ldst+64(,[[EAX]],4), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], _lptr
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _off07:
; DARWIN-32-PIC: calll L46$pb
; DARWIN-32-PIC-NEXT: L46$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: leal (_ldst-L46$pb)+64(%eax,%ecx,4), %ecx
-; DARWIN-32-PIC-NEXT: movl %ecx, _lptr-L46$pb(%eax)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal (_ldst-L46$pb)+64([[EAX]],[[ECX]],4), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[ECX]], _lptr-L46$pb([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _off07:
-; DARWIN-64-STATIC: leaq _ldst(%rip), %rax
-; DARWIN-64-STATIC-NEXT: leaq 64(%rax,%rdi,4), %rax
-; DARWIN-64-STATIC-NEXT: movq %rax, _lptr(%rip)
+; DARWIN-64-STATIC: leaq _ldst(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: leaq 64([[RAX]],%rdi,4), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movq [[RAX]], _lptr(%rip)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _off07:
-; DARWIN-64-DYNAMIC: leaq _ldst(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: leaq 64(%rax,%rdi,4), %rax
-; DARWIN-64-DYNAMIC-NEXT: movq %rax, _lptr(%rip)
+; DARWIN-64-DYNAMIC: leaq _ldst(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: leaq 64([[RAX]],%rdi,4), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], _lptr(%rip)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _off07:
-; DARWIN-64-PIC: leaq _ldst(%rip), %rax
-; DARWIN-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax
-; DARWIN-64-PIC-NEXT: movq %rax, _lptr(%rip)
+; DARWIN-64-PIC: leaq _ldst(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movq [[RAX]], _lptr(%rip)
; DARWIN-64-PIC-NEXT: ret
}
@@ -3448,75 +3459,75 @@ entry:
store i32 %3, i32* %4, align 4
ret void
; LINUX-64-STATIC: off08:
-; LINUX-64-STATIC: movl lsrc+64(,%rdi,4), %eax
-; LINUX-64-STATIC: movq lptr(%rip), %rcx
-; LINUX-64-STATIC: movl %eax, 64(%rcx,%rdi,4)
+; LINUX-64-STATIC: movl lsrc+64(,%rdi,4), [[EAX:%e.x]]
+; LINUX-64-STATIC: movq lptr(%rip), [[RCX:%r.x]]
+; LINUX-64-STATIC: movl [[EAX]], 64([[RCX]],%rdi,4)
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: off08:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: movl lsrc+64(,%eax,4), %ecx
-; LINUX-32-STATIC-NEXT: movl lptr, %edx
-; LINUX-32-STATIC-NEXT: movl %ecx, 64(%edx,%eax,4)
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl lsrc+64(,[[EAX]],4), [[ECX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl lptr, [[EDX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[ECX]], 64([[EDX]],[[EAX]],4)
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: off08:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: movl lsrc+64(,%eax,4), %ecx
-; LINUX-32-PIC-NEXT: movl lptr, %edx
-; LINUX-32-PIC-NEXT: movl %ecx, 64(%edx,%eax,4)
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl lsrc+64(,[[EAX]],4), [[ECX:%e.x]]
+; LINUX-32-PIC-NEXT: movl lptr, [[EDX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[ECX]], 64([[EDX]],[[EAX]],4)
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: off08:
-; LINUX-64-PIC: leaq lsrc(%rip), %rax
-; LINUX-64-PIC-NEXT: movl 64(%rax,%rdi,4), %eax
-; LINUX-64-PIC-NEXT: movq lptr(%rip), %rcx
-; LINUX-64-PIC-NEXT: movl %eax, 64(%rcx,%rdi,4)
+; LINUX-64-PIC: leaq lsrc(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
+; LINUX-64-PIC-NEXT: movq lptr(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _off08:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: movl _lsrc+64(,%eax,4), %ecx
-; DARWIN-32-STATIC-NEXT: movl _lptr, %edx
-; DARWIN-32-STATIC-NEXT: movl %ecx, 64(%edx,%eax,4)
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl _lsrc+64(,[[EAX]],4), [[ECX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl _lptr, [[EDX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[ECX]], 64([[EDX]],[[EAX]],4)
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _off08:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl _lsrc+64(,%eax,4), %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl _lptr, %edx
-; DARWIN-32-DYNAMIC-NEXT: movl %ecx, 64(%edx,%eax,4)
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl _lsrc+64(,[[EAX]],4), [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl _lptr, [[EDX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], 64([[EDX]],[[EAX]],4)
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _off08:
; DARWIN-32-PIC: calll L47$pb
; DARWIN-32-PIC-NEXT: L47$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: movl (_lsrc-L47$pb)+64(%eax,%ecx,4), %edx
-; DARWIN-32-PIC-NEXT: movl _lptr-L47$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: movl %edx, 64(%eax,%ecx,4)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl (_lsrc-L47$pb)+64([[EAX]],[[ECX]],4), [[EDX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl _lptr-L47$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[EDX]], 64([[EAX]],[[ECX]],4)
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _off08:
-; DARWIN-64-STATIC: leaq _lsrc(%rip), %rax
-; DARWIN-64-STATIC-NEXT: movl 64(%rax,%rdi,4), %eax
-; DARWIN-64-STATIC-NEXT: movq _lptr(%rip), %rcx
-; DARWIN-64-STATIC-NEXT: movl %eax, 64(%rcx,%rdi,4)
+; DARWIN-64-STATIC: leaq _lsrc(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-STATIC-NEXT: movq _lptr(%rip), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _off08:
-; DARWIN-64-DYNAMIC: leaq _lsrc(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: movl 64(%rax,%rdi,4), %eax
-; DARWIN-64-DYNAMIC-NEXT: movq _lptr(%rip), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movl %eax, 64(%rcx,%rdi,4)
+; DARWIN-64-DYNAMIC: leaq _lsrc(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq _lptr(%rip), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _off08:
-; DARWIN-64-PIC: leaq _lsrc(%rip), %rax
-; DARWIN-64-PIC-NEXT: movl 64(%rax,%rdi,4), %eax
-; DARWIN-64-PIC-NEXT: movq _lptr(%rip), %rcx
-; DARWIN-64-PIC-NEXT: movl %eax, 64(%rcx,%rdi,4)
+; DARWIN-64-PIC: leaq _lsrc(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-PIC-NEXT: movq _lptr(%rip), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; DARWIN-64-PIC-NEXT: ret
}
@@ -3526,68 +3537,68 @@ entry:
store i32 %0, i32* getelementptr ([131072 x i32]* @dst, i32 0, i64 65536), align 4
ret void
; LINUX-64-STATIC: moo00:
-; LINUX-64-STATIC: movl src+262144(%rip), %eax
-; LINUX-64-STATIC: movl %eax, dst+262144(%rip)
+; LINUX-64-STATIC: movl src+262144(%rip), [[EAX:%e.x]]
+; LINUX-64-STATIC: movl [[EAX]], dst+262144(%rip)
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: moo00:
-; LINUX-32-STATIC: movl src+262144, %eax
-; LINUX-32-STATIC-NEXT: movl %eax, dst+262144
+; LINUX-32-STATIC: movl src+262144, [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[EAX]], dst+262144
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: moo00:
-; LINUX-32-PIC: movl src+262144, %eax
-; LINUX-32-PIC-NEXT: movl %eax, dst+262144
+; LINUX-32-PIC: movl src+262144, [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[EAX]], dst+262144
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: moo00:
-; LINUX-64-PIC: movq src@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: movl 262144(%rax), %eax
-; LINUX-64-PIC-NEXT: movq dst@GOTPCREL(%rip), %rcx
-; LINUX-64-PIC-NEXT: movl %eax, 262144(%rcx)
+; LINUX-64-PIC: movq src@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movl 262144([[RAX]]), [[EAX:%e.x]]
+; LINUX-64-PIC-NEXT: movq dst@GOTPCREL(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movl [[EAX]], 262144([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _moo00:
-; DARWIN-32-STATIC: movl _src+262144, %eax
-; DARWIN-32-STATIC-NEXT: movl %eax, _dst+262144
+; DARWIN-32-STATIC: movl _src+262144, [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[EAX]], _dst+262144
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _moo00:
-; DARWIN-32-DYNAMIC: movl L_src$non_lazy_ptr, %eax
-; DARWIN-32-DYNAMIC-NEXT: movl 262144(%eax), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl L_dst$non_lazy_ptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl %eax, 262144(%ecx)
+; DARWIN-32-DYNAMIC: movl L_src$non_lazy_ptr, [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl 262144([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_dst$non_lazy_ptr, [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], 262144([[ECX]])
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _moo00:
; DARWIN-32-PIC: calll L48$pb
; DARWIN-32-PIC-NEXT: L48$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L48$pb(%eax), %ecx
-; DARWIN-32-PIC-NEXT: movl 262144(%ecx), %ecx
-; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L48$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: movl %ecx, 262144(%eax)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L48$pb([[EAX]]), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 262144([[ECX]]), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L48$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[ECX]], 262144([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _moo00:
-; DARWIN-64-STATIC: movq _src@GOTPCREL(%rip), %rax
-; DARWIN-64-STATIC-NEXT: movl 262144(%rax), %eax
-; DARWIN-64-STATIC-NEXT: movq _dst@GOTPCREL(%rip), %rcx
-; DARWIN-64-STATIC-NEXT: movl %eax, 262144(%rcx)
+; DARWIN-64-STATIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl 262144([[RAX]]), [[EAX:%e.x]]
+; DARWIN-64-STATIC-NEXT: movq _dst@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl [[EAX]], 262144([[RCX]])
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _moo00:
-; DARWIN-64-DYNAMIC: movq _src@GOTPCREL(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: movl 262144(%rax), %eax
-; DARWIN-64-DYNAMIC-NEXT: movq _dst@GOTPCREL(%rip), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movl %eax, 262144(%rcx)
+; DARWIN-64-DYNAMIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl 262144([[RAX]]), [[EAX:%e.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq _dst@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 262144([[RCX]])
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _moo00:
-; DARWIN-64-PIC: movq _src@GOTPCREL(%rip), %rax
-; DARWIN-64-PIC-NEXT: movl 262144(%rax), %eax
-; DARWIN-64-PIC-NEXT: movq _dst@GOTPCREL(%rip), %rcx
-; DARWIN-64-PIC-NEXT: movl %eax, 262144(%rcx)
+; DARWIN-64-PIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl 262144([[RAX]]), [[EAX:%e.x]]
+; DARWIN-64-PIC-NEXT: movq _dst@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl [[EAX]], 262144([[RCX]])
; DARWIN-64-PIC-NEXT: ret
}
@@ -3608,10 +3619,10 @@ entry:
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: moo01:
-; LINUX-64-PIC: movl $262144, %eax
-; LINUX-64-PIC-NEXT: addq dst@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), %rcx
-; LINUX-64-PIC-NEXT: movq %rax, (%rcx)
+; LINUX-64-PIC: movl $262144, [[EAX:%e.x]]
+; LINUX-64-PIC-NEXT: addq dst@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movq [[RAX]], ([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _moo01:
@@ -3619,41 +3630,41 @@ entry:
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _moo01:
-; DARWIN-32-DYNAMIC: movl $262144, %eax
-; DARWIN-32-DYNAMIC-NEXT: addl L_dst$non_lazy_ptr, %eax
-; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl %eax, (%ecx)
+; DARWIN-32-DYNAMIC: movl $262144, [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: addl L_dst$non_lazy_ptr, [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], ([[ECX]])
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _moo01:
; DARWIN-32-PIC: calll L49$pb
; DARWIN-32-PIC-NEXT: L49$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl $262144, %ecx
-; DARWIN-32-PIC-NEXT: addl L_dst$non_lazy_ptr-L49$pb(%eax), %ecx
-; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L49$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: movl %ecx, (%eax)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl $262144, [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: addl L_dst$non_lazy_ptr-L49$pb([[EAX]]), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L49$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[ECX]], ([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _moo01:
-; DARWIN-64-STATIC: movl $262144, %eax
-; DARWIN-64-STATIC-NEXT: addq _dst@GOTPCREL(%rip), %rax
-; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-STATIC-NEXT: movq %rax, (%rcx)
+; DARWIN-64-STATIC: movl $262144, [[EAX:%e.x]]
+; DARWIN-64-STATIC-NEXT: addq _dst@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movq [[RAX]], ([[RCX]])
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _moo01:
-; DARWIN-64-DYNAMIC: movl $262144, %eax
-; DARWIN-64-DYNAMIC-NEXT: addq _dst@GOTPCREL(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movq %rax, (%rcx)
+; DARWIN-64-DYNAMIC: movl $262144, [[EAX:%e.x]]
+; DARWIN-64-DYNAMIC-NEXT: addq _dst@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], ([[RCX]])
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _moo01:
-; DARWIN-64-PIC: movl $262144, %eax
-; DARWIN-64-PIC-NEXT: addq _dst@GOTPCREL(%rip), %rax
-; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-PIC-NEXT: movq %rax, (%rcx)
+; DARWIN-64-PIC: movl $262144, [[EAX:%e.x]]
+; DARWIN-64-PIC-NEXT: addq _dst@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movq [[RAX]], ([[RCX]])
; DARWIN-64-PIC-NEXT: ret
}
@@ -3665,78 +3676,78 @@ entry:
store i32 %1, i32* %2, align 4
ret void
; LINUX-64-STATIC: moo02:
-; LINUX-64-STATIC: movl src+262144(%rip), %eax
-; LINUX-64-STATIC: movq ptr(%rip), %rcx
-; LINUX-64-STATIC: movl %eax, 262144(%rcx)
+; LINUX-64-STATIC: movl src+262144(%rip), [[EAX:%e.x]]
+; LINUX-64-STATIC: movq ptr(%rip), [[RCX:%r.x]]
+; LINUX-64-STATIC: movl [[EAX]], 262144([[RCX]])
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: moo02:
-; LINUX-32-STATIC: movl src+262144, %eax
-; LINUX-32-STATIC-NEXT: movl ptr, %ecx
-; LINUX-32-STATIC-NEXT: movl %eax, 262144(%ecx)
+; LINUX-32-STATIC: movl src+262144, [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl ptr, [[ECX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[EAX]], 262144([[ECX]])
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: moo02:
-; LINUX-32-PIC: movl src+262144, %eax
-; LINUX-32-PIC-NEXT: movl ptr, %ecx
-; LINUX-32-PIC-NEXT: movl %eax, 262144(%ecx)
+; LINUX-32-PIC: movl src+262144, [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl ptr, [[ECX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[EAX]], 262144([[ECX]])
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: moo02:
-; LINUX-64-PIC: movq src@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: movl 262144(%rax), %eax
-; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), %rcx
-; LINUX-64-PIC-NEXT: movq (%rcx), %rcx
-; LINUX-64-PIC-NEXT: movl %eax, 262144(%rcx)
+; LINUX-64-PIC: movq src@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movl 262144([[RAX]]), [[EAX:%e.x]]
+; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movl [[EAX]], 262144([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _moo02:
-; DARWIN-32-STATIC: movl _src+262144, %eax
-; DARWIN-32-STATIC-NEXT: movl _ptr, %ecx
-; DARWIN-32-STATIC-NEXT: movl %eax, 262144(%ecx)
+; DARWIN-32-STATIC: movl _src+262144, [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl _ptr, [[ECX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[EAX]], 262144([[ECX]])
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _moo02:
-; DARWIN-32-DYNAMIC: movl L_src$non_lazy_ptr, %eax
-; DARWIN-32-DYNAMIC-NEXT: movl 262144(%eax), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl (%ecx), %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl %eax, 262144(%ecx)
+; DARWIN-32-DYNAMIC: movl L_src$non_lazy_ptr, [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl 262144([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl ([[ECX]]), [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], 262144([[ECX]])
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _moo02:
; DARWIN-32-PIC: calll L50$pb
; DARWIN-32-PIC-NEXT: L50$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L50$pb(%eax), %ecx
-; DARWIN-32-PIC-NEXT: movl 262144(%ecx), %ecx
-; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L50$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: movl (%eax), %eax
-; DARWIN-32-PIC-NEXT: movl %ecx, 262144(%eax)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L50$pb([[EAX]]), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 262144([[ECX]]), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L50$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl ([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[ECX]], 262144([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _moo02:
-; DARWIN-64-STATIC: movq _src@GOTPCREL(%rip), %rax
-; DARWIN-64-STATIC-NEXT: movl 262144(%rax), %eax
-; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-STATIC-NEXT: movq (%rcx), %rcx
-; DARWIN-64-STATIC-NEXT: movl %eax, 262144(%rcx)
+; DARWIN-64-STATIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl 262144([[RAX]]), [[EAX:%e.x]]
+; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl [[EAX]], 262144([[RCX]])
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _moo02:
-; DARWIN-64-DYNAMIC: movq _src@GOTPCREL(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: movl 262144(%rax), %eax
-; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movq (%rcx), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movl %eax, 262144(%rcx)
+; DARWIN-64-DYNAMIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl 262144([[RAX]]), [[EAX:%e.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 262144([[RCX]])
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _moo02:
-; DARWIN-64-PIC: movq _src@GOTPCREL(%rip), %rax
-; DARWIN-64-PIC-NEXT: movl 262144(%rax), %eax
-; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-PIC-NEXT: movq (%rcx), %rcx
-; DARWIN-64-PIC-NEXT: movl %eax, 262144(%rcx)
+; DARWIN-64-PIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl 262144([[RAX]]), [[EAX:%e.x]]
+; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl [[EAX]], 262144([[RCX]])
; DARWIN-64-PIC-NEXT: ret
}
@@ -3746,58 +3757,58 @@ entry:
store i32 %0, i32* getelementptr ([131072 x i32]* @ddst, i32 0, i64 65536), align 32
ret void
; LINUX-64-STATIC: moo03:
-; LINUX-64-STATIC: movl dsrc+262144(%rip), %eax
-; LINUX-64-STATIC: movl %eax, ddst+262144(%rip)
+; LINUX-64-STATIC: movl dsrc+262144(%rip), [[EAX:%e.x]]
+; LINUX-64-STATIC: movl [[EAX]], ddst+262144(%rip)
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: moo03:
-; LINUX-32-STATIC: movl dsrc+262144, %eax
-; LINUX-32-STATIC-NEXT: movl %eax, ddst+262144
+; LINUX-32-STATIC: movl dsrc+262144, [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[EAX]], ddst+262144
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: moo03:
-; LINUX-32-PIC: movl dsrc+262144, %eax
-; LINUX-32-PIC-NEXT: movl %eax, ddst+262144
+; LINUX-32-PIC: movl dsrc+262144, [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[EAX]], ddst+262144
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: moo03:
-; LINUX-64-PIC: movq dsrc@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: movl 262144(%rax), %eax
-; LINUX-64-PIC-NEXT: movq ddst@GOTPCREL(%rip), %rcx
-; LINUX-64-PIC-NEXT: movl %eax, 262144(%rcx)
+; LINUX-64-PIC: movq dsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movl 262144([[RAX]]), [[EAX:%e.x]]
+; LINUX-64-PIC-NEXT: movq ddst@GOTPCREL(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movl [[EAX]], 262144([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _moo03:
-; DARWIN-32-STATIC: movl _dsrc+262144, %eax
-; DARWIN-32-STATIC-NEXT: movl %eax, _ddst+262144
+; DARWIN-32-STATIC: movl _dsrc+262144, [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[EAX]], _ddst+262144
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _moo03:
-; DARWIN-32-DYNAMIC: movl _dsrc+262144, %eax
-; DARWIN-32-DYNAMIC-NEXT: movl %eax, _ddst+262144
+; DARWIN-32-DYNAMIC: movl _dsrc+262144, [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], _ddst+262144
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _moo03:
; DARWIN-32-PIC: calll L51$pb
; DARWIN-32-PIC-NEXT: L51$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl (_dsrc-L51$pb)+262144(%eax), %ecx
-; DARWIN-32-PIC-NEXT: movl %ecx, (_ddst-L51$pb)+262144(%eax)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl (_dsrc-L51$pb)+262144([[EAX]]), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[ECX]], (_ddst-L51$pb)+262144([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _moo03:
-; DARWIN-64-STATIC: movl _dsrc+262144(%rip), %eax
-; DARWIN-64-STATIC-NEXT: movl %eax, _ddst+262144(%rip)
+; DARWIN-64-STATIC: movl _dsrc+262144(%rip), [[EAX:%e.x]]
+; DARWIN-64-STATIC-NEXT: movl [[EAX]], _ddst+262144(%rip)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _moo03:
-; DARWIN-64-DYNAMIC: movl _dsrc+262144(%rip), %eax
-; DARWIN-64-DYNAMIC-NEXT: movl %eax, _ddst+262144(%rip)
+; DARWIN-64-DYNAMIC: movl _dsrc+262144(%rip), [[EAX:%e.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], _ddst+262144(%rip)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _moo03:
-; DARWIN-64-PIC: movl _dsrc+262144(%rip), %eax
-; DARWIN-64-PIC-NEXT: movl %eax, _ddst+262144(%rip)
+; DARWIN-64-PIC: movl _dsrc+262144(%rip), [[EAX:%e.x]]
+; DARWIN-64-PIC-NEXT: movl [[EAX]], _ddst+262144(%rip)
; DARWIN-64-PIC-NEXT: ret
}
@@ -3818,10 +3829,10 @@ entry:
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: moo04:
-; LINUX-64-PIC: movl $262144, %eax
-; LINUX-64-PIC-NEXT: addq ddst@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: movq dptr@GOTPCREL(%rip), %rcx
-; LINUX-64-PIC-NEXT: movq %rax, (%rcx)
+; LINUX-64-PIC: movl $262144, [[EAX:%e.x]]
+; LINUX-64-PIC-NEXT: addq ddst@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movq dptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movq [[RAX]], ([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _moo04:
@@ -3835,24 +3846,24 @@ entry:
; DARWIN-32-PIC: _moo04:
; DARWIN-32-PIC: calll L52$pb
; DARWIN-32-PIC-NEXT: L52$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: leal (_ddst-L52$pb)+262144(%eax), %ecx
-; DARWIN-32-PIC-NEXT: movl %ecx, _dptr-L52$pb(%eax)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal (_ddst-L52$pb)+262144([[EAX]]), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[ECX]], _dptr-L52$pb([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _moo04:
-; DARWIN-64-STATIC: leaq _ddst+262144(%rip), %rax
-; DARWIN-64-STATIC-NEXT: movq %rax, _dptr(%rip)
+; DARWIN-64-STATIC: leaq _ddst+262144(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movq [[RAX]], _dptr(%rip)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _moo04:
-; DARWIN-64-DYNAMIC: leaq _ddst+262144(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: movq %rax, _dptr(%rip)
+; DARWIN-64-DYNAMIC: leaq _ddst+262144(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], _dptr(%rip)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _moo04:
-; DARWIN-64-PIC: leaq _ddst+262144(%rip), %rax
-; DARWIN-64-PIC-NEXT: movq %rax, _dptr(%rip)
+; DARWIN-64-PIC: leaq _ddst+262144(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movq [[RAX]], _dptr(%rip)
; DARWIN-64-PIC-NEXT: ret
}
@@ -3864,68 +3875,68 @@ entry:
store i32 %1, i32* %2, align 4
ret void
; LINUX-64-STATIC: moo05:
-; LINUX-64-STATIC: movl dsrc+262144(%rip), %eax
-; LINUX-64-STATIC: movq dptr(%rip), %rcx
-; LINUX-64-STATIC: movl %eax, 262144(%rcx)
+; LINUX-64-STATIC: movl dsrc+262144(%rip), [[EAX:%e.x]]
+; LINUX-64-STATIC: movq dptr(%rip), [[RCX:%r.x]]
+; LINUX-64-STATIC: movl [[EAX]], 262144([[RCX]])
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: moo05:
-; LINUX-32-STATIC: movl dsrc+262144, %eax
-; LINUX-32-STATIC-NEXT: movl dptr, %ecx
-; LINUX-32-STATIC-NEXT: movl %eax, 262144(%ecx)
+; LINUX-32-STATIC: movl dsrc+262144, [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl dptr, [[ECX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[EAX]], 262144([[ECX]])
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: moo05:
-; LINUX-32-PIC: movl dsrc+262144, %eax
-; LINUX-32-PIC-NEXT: movl dptr, %ecx
-; LINUX-32-PIC-NEXT: movl %eax, 262144(%ecx)
+; LINUX-32-PIC: movl dsrc+262144, [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl dptr, [[ECX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[EAX]], 262144([[ECX]])
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: moo05:
-; LINUX-64-PIC: movq dsrc@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: movl 262144(%rax), %eax
-; LINUX-64-PIC-NEXT: movq dptr@GOTPCREL(%rip), %rcx
-; LINUX-64-PIC-NEXT: movq (%rcx), %rcx
-; LINUX-64-PIC-NEXT: movl %eax, 262144(%rcx)
+; LINUX-64-PIC: movq dsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movl 262144([[RAX]]), [[EAX:%e.x]]
+; LINUX-64-PIC-NEXT: movq dptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movl [[EAX]], 262144([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _moo05:
-; DARWIN-32-STATIC: movl _dsrc+262144, %eax
-; DARWIN-32-STATIC-NEXT: movl _dptr, %ecx
-; DARWIN-32-STATIC-NEXT: movl %eax, 262144(%ecx)
+; DARWIN-32-STATIC: movl _dsrc+262144, [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl _dptr, [[ECX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[EAX]], 262144([[ECX]])
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _moo05:
-; DARWIN-32-DYNAMIC: movl _dsrc+262144, %eax
-; DARWIN-32-DYNAMIC-NEXT: movl _dptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl %eax, 262144(%ecx)
+; DARWIN-32-DYNAMIC: movl _dsrc+262144, [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl _dptr, [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], 262144([[ECX]])
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _moo05:
; DARWIN-32-PIC: calll L53$pb
; DARWIN-32-PIC-NEXT: L53$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl (_dsrc-L53$pb)+262144(%eax), %ecx
-; DARWIN-32-PIC-NEXT: movl _dptr-L53$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: movl %ecx, 262144(%eax)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl (_dsrc-L53$pb)+262144([[EAX]]), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl _dptr-L53$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[ECX]], 262144([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _moo05:
-; DARWIN-64-STATIC: movl _dsrc+262144(%rip), %eax
-; DARWIN-64-STATIC-NEXT: movq _dptr(%rip), %rcx
-; DARWIN-64-STATIC-NEXT: movl %eax, 262144(%rcx)
+; DARWIN-64-STATIC: movl _dsrc+262144(%rip), [[EAX:%e.x]]
+; DARWIN-64-STATIC-NEXT: movq _dptr(%rip), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl [[EAX]], 262144([[RCX]])
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _moo05:
-; DARWIN-64-DYNAMIC: movl _dsrc+262144(%rip), %eax
-; DARWIN-64-DYNAMIC-NEXT: movq _dptr(%rip), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movl %eax, 262144(%rcx)
+; DARWIN-64-DYNAMIC: movl _dsrc+262144(%rip), [[EAX:%e.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq _dptr(%rip), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 262144([[RCX]])
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _moo05:
-; DARWIN-64-PIC: movl _dsrc+262144(%rip), %eax
-; DARWIN-64-PIC-NEXT: movq _dptr(%rip), %rcx
-; DARWIN-64-PIC-NEXT: movl %eax, 262144(%rcx)
+; DARWIN-64-PIC: movl _dsrc+262144(%rip), [[EAX:%e.x]]
+; DARWIN-64-PIC-NEXT: movq _dptr(%rip), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl [[EAX]], 262144([[RCX]])
; DARWIN-64-PIC-NEXT: ret
}
@@ -3935,56 +3946,56 @@ entry:
store i32 %0, i32* getelementptr ([131072 x i32]* @ldst, i32 0, i64 65536), align 4
ret void
; LINUX-64-STATIC: moo06:
-; LINUX-64-STATIC: movl lsrc+262144(%rip), %eax
-; LINUX-64-STATIC: movl %eax, ldst+262144(%rip)
+; LINUX-64-STATIC: movl lsrc+262144(%rip), [[EAX:%e.x]]
+; LINUX-64-STATIC: movl [[EAX]], ldst+262144(%rip)
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: moo06:
-; LINUX-32-STATIC: movl lsrc+262144, %eax
-; LINUX-32-STATIC-NEXT: movl %eax, ldst+262144
+; LINUX-32-STATIC: movl lsrc+262144, [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[EAX]], ldst+262144
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: moo06:
-; LINUX-32-PIC: movl lsrc+262144, %eax
-; LINUX-32-PIC-NEXT: movl %eax, ldst+262144
+; LINUX-32-PIC: movl lsrc+262144, [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[EAX]], ldst+262144
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: moo06:
-; LINUX-64-PIC: movl lsrc+262144(%rip), %eax
-; LINUX-64-PIC-NEXT: movl %eax, ldst+262144(%rip)
+; LINUX-64-PIC: movl lsrc+262144(%rip), [[EAX:%e.x]]
+; LINUX-64-PIC-NEXT: movl [[EAX]], ldst+262144(%rip)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _moo06:
-; DARWIN-32-STATIC: movl _lsrc+262144, %eax
-; DARWIN-32-STATIC-NEXT: movl %eax, _ldst+262144
+; DARWIN-32-STATIC: movl _lsrc+262144, [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[EAX]], _ldst+262144
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _moo06:
-; DARWIN-32-DYNAMIC: movl _lsrc+262144, %eax
-; DARWIN-32-DYNAMIC-NEXT: movl %eax, _ldst+262144
+; DARWIN-32-DYNAMIC: movl _lsrc+262144, [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], _ldst+262144
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _moo06:
; DARWIN-32-PIC: calll L54$pb
; DARWIN-32-PIC-NEXT: L54$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl (_lsrc-L54$pb)+262144(%eax), %ecx
-; DARWIN-32-PIC-NEXT: movl %ecx, (_ldst-L54$pb)+262144(%eax)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl (_lsrc-L54$pb)+262144([[EAX]]), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[ECX]], (_ldst-L54$pb)+262144([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _moo06:
-; DARWIN-64-STATIC: movl _lsrc+262144(%rip), %eax
-; DARWIN-64-STATIC-NEXT: movl %eax, _ldst+262144(%rip)
+; DARWIN-64-STATIC: movl _lsrc+262144(%rip), [[EAX:%e.x]]
+; DARWIN-64-STATIC-NEXT: movl [[EAX]], _ldst+262144(%rip)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _moo06:
-; DARWIN-64-DYNAMIC: movl _lsrc+262144(%rip), %eax
-; DARWIN-64-DYNAMIC-NEXT: movl %eax, _ldst+262144(%rip)
+; DARWIN-64-DYNAMIC: movl _lsrc+262144(%rip), [[EAX:%e.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], _ldst+262144(%rip)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _moo06:
-; DARWIN-64-PIC: movl _lsrc+262144(%rip), %eax
-; DARWIN-64-PIC-NEXT: movl %eax, _ldst+262144(%rip)
+; DARWIN-64-PIC: movl _lsrc+262144(%rip), [[EAX:%e.x]]
+; DARWIN-64-PIC-NEXT: movl [[EAX]], _ldst+262144(%rip)
; DARWIN-64-PIC-NEXT: ret
}
@@ -4005,8 +4016,8 @@ entry:
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: moo07:
-; LINUX-64-PIC: leaq ldst+262144(%rip), %rax
-; LINUX-64-PIC-NEXT: movq %rax, lptr(%rip)
+; LINUX-64-PIC: leaq ldst+262144(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movq [[RAX]], lptr(%rip)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _moo07:
@@ -4020,24 +4031,24 @@ entry:
; DARWIN-32-PIC: _moo07:
; DARWIN-32-PIC: calll L55$pb
; DARWIN-32-PIC-NEXT: L55$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: leal (_ldst-L55$pb)+262144(%eax), %ecx
-; DARWIN-32-PIC-NEXT: movl %ecx, _lptr-L55$pb(%eax)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal (_ldst-L55$pb)+262144([[EAX]]), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[ECX]], _lptr-L55$pb([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _moo07:
-; DARWIN-64-STATIC: leaq _ldst+262144(%rip), %rax
-; DARWIN-64-STATIC-NEXT: movq %rax, _lptr(%rip)
+; DARWIN-64-STATIC: leaq _ldst+262144(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movq [[RAX]], _lptr(%rip)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _moo07:
-; DARWIN-64-DYNAMIC: leaq _ldst+262144(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: movq %rax, _lptr(%rip)
+; DARWIN-64-DYNAMIC: leaq _ldst+262144(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], _lptr(%rip)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _moo07:
-; DARWIN-64-PIC: leaq _ldst+262144(%rip), %rax
-; DARWIN-64-PIC-NEXT: movq %rax, _lptr(%rip)
+; DARWIN-64-PIC: leaq _ldst+262144(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movq [[RAX]], _lptr(%rip)
; DARWIN-64-PIC-NEXT: ret
}
@@ -4049,66 +4060,66 @@ entry:
store i32 %1, i32* %2, align 4
ret void
; LINUX-64-STATIC: moo08:
-; LINUX-64-STATIC: movl lsrc+262144(%rip), %eax
-; LINUX-64-STATIC: movq lptr(%rip), %rcx
-; LINUX-64-STATIC: movl %eax, 262144(%rcx)
+; LINUX-64-STATIC: movl lsrc+262144(%rip), [[EAX:%e.x]]
+; LINUX-64-STATIC: movq lptr(%rip), [[RCX:%r.x]]
+; LINUX-64-STATIC: movl [[EAX]], 262144([[RCX]])
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: moo08:
-; LINUX-32-STATIC: movl lsrc+262144, %eax
-; LINUX-32-STATIC-NEXT: movl lptr, %ecx
-; LINUX-32-STATIC-NEXT: movl %eax, 262144(%ecx)
+; LINUX-32-STATIC: movl lsrc+262144, [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl lptr, [[ECX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[EAX]], 262144([[ECX]])
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: moo08:
-; LINUX-32-PIC: movl lsrc+262144, %eax
-; LINUX-32-PIC-NEXT: movl lptr, %ecx
-; LINUX-32-PIC-NEXT: movl %eax, 262144(%ecx)
+; LINUX-32-PIC: movl lsrc+262144, [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl lptr, [[ECX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[EAX]], 262144([[ECX]])
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: moo08:
-; LINUX-64-PIC: movl lsrc+262144(%rip), %eax
-; LINUX-64-PIC-NEXT: movq lptr(%rip), %rcx
-; LINUX-64-PIC-NEXT: movl %eax, 262144(%rcx)
+; LINUX-64-PIC: movl lsrc+262144(%rip), [[EAX:%e.x]]
+; LINUX-64-PIC-NEXT: movq lptr(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movl [[EAX]], 262144([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _moo08:
-; DARWIN-32-STATIC: movl _lsrc+262144, %eax
-; DARWIN-32-STATIC-NEXT: movl _lptr, %ecx
-; DARWIN-32-STATIC-NEXT: movl %eax, 262144(%ecx)
+; DARWIN-32-STATIC: movl _lsrc+262144, [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl _lptr, [[ECX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[EAX]], 262144([[ECX]])
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _moo08:
-; DARWIN-32-DYNAMIC: movl _lsrc+262144, %eax
-; DARWIN-32-DYNAMIC-NEXT: movl _lptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl %eax, 262144(%ecx)
+; DARWIN-32-DYNAMIC: movl _lsrc+262144, [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl _lptr, [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], 262144([[ECX]])
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _moo08:
; DARWIN-32-PIC: calll L56$pb
; DARWIN-32-PIC-NEXT: L56$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl (_lsrc-L56$pb)+262144(%eax), %ecx
-; DARWIN-32-PIC-NEXT: movl _lptr-L56$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: movl %ecx, 262144(%eax)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl (_lsrc-L56$pb)+262144([[EAX]]), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl _lptr-L56$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[ECX]], 262144([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _moo08:
-; DARWIN-64-STATIC: movl _lsrc+262144(%rip), %eax
-; DARWIN-64-STATIC-NEXT: movq _lptr(%rip), %rcx
-; DARWIN-64-STATIC-NEXT: movl %eax, 262144(%rcx)
+; DARWIN-64-STATIC: movl _lsrc+262144(%rip), [[EAX:%e.x]]
+; DARWIN-64-STATIC-NEXT: movq _lptr(%rip), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl [[EAX]], 262144([[RCX]])
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _moo08:
-; DARWIN-64-DYNAMIC: movl _lsrc+262144(%rip), %eax
-; DARWIN-64-DYNAMIC-NEXT: movq _lptr(%rip), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movl %eax, 262144(%rcx)
+; DARWIN-64-DYNAMIC: movl _lsrc+262144(%rip), [[EAX:%e.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq _lptr(%rip), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 262144([[RCX]])
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _moo08:
-; DARWIN-64-PIC: movl _lsrc+262144(%rip), %eax
-; DARWIN-64-PIC-NEXT: movq _lptr(%rip), %rcx
-; DARWIN-64-PIC-NEXT: movl %eax, 262144(%rcx)
+; DARWIN-64-PIC: movl _lsrc+262144(%rip), [[EAX:%e.x]]
+; DARWIN-64-PIC-NEXT: movq _lptr(%rip), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl [[EAX]], 262144([[RCX]])
; DARWIN-64-PIC-NEXT: ret
}
@@ -4121,73 +4132,73 @@ entry:
store i32 %2, i32* %3, align 4
ret void
; LINUX-64-STATIC: big00:
-; LINUX-64-STATIC: movl src+262144(,%rdi,4), %eax
-; LINUX-64-STATIC: movl %eax, dst+262144(,%rdi,4)
+; LINUX-64-STATIC: movl src+262144(,%rdi,4), [[EAX:%e.x]]
+; LINUX-64-STATIC: movl [[EAX]], dst+262144(,%rdi,4)
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: big00:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: movl src+262144(,%eax,4), %ecx
-; LINUX-32-STATIC-NEXT: movl %ecx, dst+262144(,%eax,4)
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl src+262144(,[[EAX]],4), [[ECX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[ECX]], dst+262144(,[[EAX]],4)
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: big00:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: movl src+262144(,%eax,4), %ecx
-; LINUX-32-PIC-NEXT: movl %ecx, dst+262144(,%eax,4)
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl src+262144(,[[EAX]],4), [[ECX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[ECX]], dst+262144(,[[EAX]],4)
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: big00:
-; LINUX-64-PIC: movq src@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: movl 262144(%rax,%rdi,4), %eax
-; LINUX-64-PIC-NEXT: movq dst@GOTPCREL(%rip), %rcx
-; LINUX-64-PIC-NEXT: movl %eax, 262144(%rcx,%rdi,4)
+; LINUX-64-PIC: movq src@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movl 262144([[RAX]],%rdi,4), [[EAX:%e.x]]
+; LINUX-64-PIC-NEXT: movq dst@GOTPCREL(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movl [[EAX]], 262144([[RCX]],%rdi,4)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _big00:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: movl _src+262144(,%eax,4), %ecx
-; DARWIN-32-STATIC-NEXT: movl %ecx, _dst+262144(,%eax,4)
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl _src+262144(,[[EAX]],4), [[ECX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[ECX]], _dst+262144(,[[EAX]],4)
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _big00:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl L_src$non_lazy_ptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl 262144(%ecx,%eax,4), %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl L_dst$non_lazy_ptr, %edx
-; DARWIN-32-DYNAMIC-NEXT: movl %ecx, 262144(%edx,%eax,4)
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_src$non_lazy_ptr, [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl 262144([[ECX]],[[EAX]],4), [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_dst$non_lazy_ptr, [[EDX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], 262144([[EDX]],[[EAX]],4)
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _big00:
; DARWIN-32-PIC: calll L57$pb
; DARWIN-32-PIC-NEXT: L57$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L57$pb(%eax), %edx
-; DARWIN-32-PIC-NEXT: movl 262144(%edx,%ecx,4), %edx
-; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L57$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: movl %edx, 262144(%eax,%ecx,4)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L57$pb([[EAX]]), [[EDX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 262144([[EDX]],[[ECX]],4), [[EDX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L57$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[EDX]], 262144([[EAX]],[[ECX]],4)
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _big00:
-; DARWIN-64-STATIC: movq _src@GOTPCREL(%rip), %rax
-; DARWIN-64-STATIC-NEXT: movl 262144(%rax,%rdi,4), %eax
-; DARWIN-64-STATIC-NEXT: movq _dst@GOTPCREL(%rip), %rcx
-; DARWIN-64-STATIC-NEXT: movl %eax, 262144(%rcx,%rdi,4)
+; DARWIN-64-STATIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl 262144([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-STATIC-NEXT: movq _dst@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl [[EAX]], 262144([[RCX]],%rdi,4)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _big00:
-; DARWIN-64-DYNAMIC: movq _src@GOTPCREL(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: movl 262144(%rax,%rdi,4), %eax
-; DARWIN-64-DYNAMIC-NEXT: movq _dst@GOTPCREL(%rip), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movl %eax, 262144(%rcx,%rdi,4)
+; DARWIN-64-DYNAMIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl 262144([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq _dst@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 262144([[RCX]],%rdi,4)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _big00:
-; DARWIN-64-PIC: movq _src@GOTPCREL(%rip), %rax
-; DARWIN-64-PIC-NEXT: movl 262144(%rax,%rdi,4), %eax
-; DARWIN-64-PIC-NEXT: movq _dst@GOTPCREL(%rip), %rcx
-; DARWIN-64-PIC-NEXT: movl %eax, 262144(%rcx,%rdi,4)
+; DARWIN-64-PIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl 262144([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-PIC-NEXT: movq _dst@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl [[EAX]], 262144([[RCX]],%rdi,4)
; DARWIN-64-PIC-NEXT: ret
}
@@ -4198,73 +4209,73 @@ entry:
store i32* %0, i32** @ptr, align 8
ret void
; LINUX-64-STATIC: big01:
-; LINUX-64-STATIC: leaq dst+262144(,%rdi,4), %rax
-; LINUX-64-STATIC: movq %rax, ptr(%rip)
+; LINUX-64-STATIC: leaq dst+262144(,%rdi,4), [[RAX:%r.x]]
+; LINUX-64-STATIC: movq [[RAX]], ptr(%rip)
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: big01:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: leal dst+262144(,%eax,4), %eax
-; LINUX-32-STATIC-NEXT: movl %eax, ptr
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: leal dst+262144(,[[EAX]],4), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[EAX]], ptr
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: big01:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: leal dst+262144(,%eax,4), %eax
-; LINUX-32-PIC-NEXT: movl %eax, ptr
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: leal dst+262144(,[[EAX]],4), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[EAX]], ptr
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: big01:
-; LINUX-64-PIC: movq dst@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
-; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), %rcx
-; LINUX-64-PIC-NEXT: movq %rax, (%rcx)
+; LINUX-64-PIC: movq dst@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movq [[RAX]], ([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _big01:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: leal _dst+262144(,%eax,4), %eax
-; DARWIN-32-STATIC-NEXT: movl %eax, _ptr
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: leal _dst+262144(,[[EAX]],4), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[EAX]], _ptr
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _big01:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl L_dst$non_lazy_ptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: leal 262144(%ecx,%eax,4), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl %eax, (%ecx)
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_dst$non_lazy_ptr, [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: leal 262144([[ECX]],[[EAX]],4), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], ([[ECX]])
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _big01:
; DARWIN-32-PIC: calll L58$pb
; DARWIN-32-PIC-NEXT: L58$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L58$pb(%eax), %edx
-; DARWIN-32-PIC-NEXT: leal 262144(%edx,%ecx,4), %ecx
-; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L58$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: movl %ecx, (%eax)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L58$pb([[EAX]]), [[EDX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal 262144([[EDX]],[[ECX]],4), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L58$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[ECX]], ([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _big01:
-; DARWIN-64-STATIC: movq _dst@GOTPCREL(%rip), %rax
-; DARWIN-64-STATIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
-; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-STATIC-NEXT: movq %rax, (%rcx)
+; DARWIN-64-STATIC: movq _dst@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: leaq 262144([[RAX]],%rdi,4), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movq [[RAX]], ([[RCX]])
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _big01:
-; DARWIN-64-DYNAMIC: movq _dst@GOTPCREL(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
-; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movq %rax, (%rcx)
+; DARWIN-64-DYNAMIC: movq _dst@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: leaq 262144([[RAX]],%rdi,4), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], ([[RCX]])
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _big01:
-; DARWIN-64-PIC: movq _dst@GOTPCREL(%rip), %rax
-; DARWIN-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
-; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-PIC-NEXT: movq %rax, (%rcx)
+; DARWIN-64-PIC: movq _dst@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movq [[RAX]], ([[RCX]])
; DARWIN-64-PIC-NEXT: ret
}
@@ -4278,83 +4289,83 @@ entry:
store i32 %3, i32* %4, align 4
ret void
; LINUX-64-STATIC: big02:
-; LINUX-64-STATIC: movl src+262144(,%rdi,4), %eax
-; LINUX-64-STATIC: movq ptr(%rip), %rcx
-; LINUX-64-STATIC: movl %eax, 262144(%rcx,%rdi,4)
+; LINUX-64-STATIC: movl src+262144(,%rdi,4), [[EAX:%e.x]]
+; LINUX-64-STATIC: movq ptr(%rip), [[RCX:%r.x]]
+; LINUX-64-STATIC: movl [[EAX]], 262144([[RCX]],%rdi,4)
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: big02:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: movl src+262144(,%eax,4), %ecx
-; LINUX-32-STATIC-NEXT: movl ptr, %edx
-; LINUX-32-STATIC-NEXT: movl %ecx, 262144(%edx,%eax,4)
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl src+262144(,[[EAX]],4), [[ECX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl ptr, [[EDX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[ECX]], 262144([[EDX]],[[EAX]],4)
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: big02:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: movl src+262144(,%eax,4), %ecx
-; LINUX-32-PIC-NEXT: movl ptr, %edx
-; LINUX-32-PIC-NEXT: movl %ecx, 262144(%edx,%eax,4)
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl src+262144(,[[EAX]],4), [[ECX:%e.x]]
+; LINUX-32-PIC-NEXT: movl ptr, [[EDX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[ECX]], 262144([[EDX]],[[EAX]],4)
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: big02:
-; LINUX-64-PIC: movq src@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: movl 262144(%rax,%rdi,4), %eax
-; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), %rcx
-; LINUX-64-PIC-NEXT: movq (%rcx), %rcx
-; LINUX-64-PIC-NEXT: movl %eax, 262144(%rcx,%rdi,4)
+; LINUX-64-PIC: movq src@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movl 262144([[RAX]],%rdi,4), [[EAX:%e.x]]
+; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movl [[EAX]], 262144([[RCX]],%rdi,4)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _big02:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: movl _src+262144(,%eax,4), %ecx
-; DARWIN-32-STATIC-NEXT: movl _ptr, %edx
-; DARWIN-32-STATIC-NEXT: movl %ecx, 262144(%edx,%eax,4)
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl _src+262144(,[[EAX]],4), [[ECX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl _ptr, [[EDX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[ECX]], 262144([[EDX]],[[EAX]],4)
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _big02:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl L_src$non_lazy_ptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl 262144(%ecx,%eax,4), %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, %edx
-; DARWIN-32-DYNAMIC-NEXT: movl (%edx), %edx
-; DARWIN-32-DYNAMIC-NEXT: movl %ecx, 262144(%edx,%eax,4)
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_src$non_lazy_ptr, [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl 262144([[ECX]],[[EAX]],4), [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[EDX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl ([[EDX]]), [[EDX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], 262144([[EDX]],[[EAX]],4)
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _big02:
; DARWIN-32-PIC: calll L59$pb
; DARWIN-32-PIC-NEXT: L59$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L59$pb(%eax), %edx
-; DARWIN-32-PIC-NEXT: movl 262144(%edx,%ecx,4), %edx
-; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L59$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: movl (%eax), %eax
-; DARWIN-32-PIC-NEXT: movl %edx, 262144(%eax,%ecx,4)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L59$pb([[EAX]]), [[EDX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 262144([[EDX]],[[ECX]],4), [[EDX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L59$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl ([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[EDX]], 262144([[EAX]],[[ECX]],4)
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _big02:
-; DARWIN-64-STATIC: movq _src@GOTPCREL(%rip), %rax
-; DARWIN-64-STATIC-NEXT: movl 262144(%rax,%rdi,4), %eax
-; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-STATIC-NEXT: movq (%rcx), %rcx
-; DARWIN-64-STATIC-NEXT: movl %eax, 262144(%rcx,%rdi,4)
+; DARWIN-64-STATIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl 262144([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl [[EAX]], 262144([[RCX]],%rdi,4)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _big02:
-; DARWIN-64-DYNAMIC: movq _src@GOTPCREL(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: movl 262144(%rax,%rdi,4), %eax
-; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movq (%rcx), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movl %eax, 262144(%rcx,%rdi,4)
+; DARWIN-64-DYNAMIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl 262144([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 262144([[RCX]],%rdi,4)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _big02:
-; DARWIN-64-PIC: movq _src@GOTPCREL(%rip), %rax
-; DARWIN-64-PIC-NEXT: movl 262144(%rax,%rdi,4), %eax
-; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), %rcx
-; DARWIN-64-PIC-NEXT: movq (%rcx), %rcx
-; DARWIN-64-PIC-NEXT: movl %eax, 262144(%rcx,%rdi,4)
+; DARWIN-64-PIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl 262144([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl [[EAX]], 262144([[RCX]],%rdi,4)
; DARWIN-64-PIC-NEXT: ret
}
@@ -4367,69 +4378,69 @@ entry:
store i32 %2, i32* %3, align 4
ret void
; LINUX-64-STATIC: big03:
-; LINUX-64-STATIC: movl dsrc+262144(,%rdi,4), %eax
-; LINUX-64-STATIC: movl %eax, ddst+262144(,%rdi,4)
+; LINUX-64-STATIC: movl dsrc+262144(,%rdi,4), [[EAX:%e.x]]
+; LINUX-64-STATIC: movl [[EAX]], ddst+262144(,%rdi,4)
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: big03:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: movl dsrc+262144(,%eax,4), %ecx
-; LINUX-32-STATIC-NEXT: movl %ecx, ddst+262144(,%eax,4)
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl dsrc+262144(,[[EAX]],4), [[ECX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[ECX]], ddst+262144(,[[EAX]],4)
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: big03:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: movl dsrc+262144(,%eax,4), %ecx
-; LINUX-32-PIC-NEXT: movl %ecx, ddst+262144(,%eax,4)
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl dsrc+262144(,[[EAX]],4), [[ECX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[ECX]], ddst+262144(,[[EAX]],4)
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: big03:
-; LINUX-64-PIC: movq dsrc@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: movl 262144(%rax,%rdi,4), %eax
-; LINUX-64-PIC-NEXT: movq ddst@GOTPCREL(%rip), %rcx
-; LINUX-64-PIC-NEXT: movl %eax, 262144(%rcx,%rdi,4)
+; LINUX-64-PIC: movq dsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movl 262144([[RAX]],%rdi,4), [[EAX:%e.x]]
+; LINUX-64-PIC-NEXT: movq ddst@GOTPCREL(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movl [[EAX]], 262144([[RCX]],%rdi,4)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _big03:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: movl _dsrc+262144(,%eax,4), %ecx
-; DARWIN-32-STATIC-NEXT: movl %ecx, _ddst+262144(,%eax,4)
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl _dsrc+262144(,[[EAX]],4), [[ECX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[ECX]], _ddst+262144(,[[EAX]],4)
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _big03:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl _dsrc+262144(,%eax,4), %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl %ecx, _ddst+262144(,%eax,4)
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl _dsrc+262144(,[[EAX]],4), [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], _ddst+262144(,[[EAX]],4)
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _big03:
; DARWIN-32-PIC: calll L60$pb
; DARWIN-32-PIC-NEXT: L60$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: movl (_dsrc-L60$pb)+262144(%eax,%ecx,4), %edx
-; DARWIN-32-PIC-NEXT: movl %edx, (_ddst-L60$pb)+262144(%eax,%ecx,4)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl (_dsrc-L60$pb)+262144([[EAX]],[[ECX]],4), [[EDX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[EDX]], (_ddst-L60$pb)+262144([[EAX]],[[ECX]],4)
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _big03:
-; DARWIN-64-STATIC: leaq _dsrc(%rip), %rax
-; DARWIN-64-STATIC-NEXT: movl 262144(%rax,%rdi,4), %eax
-; DARWIN-64-STATIC-NEXT: leaq _ddst(%rip), %rcx
-; DARWIN-64-STATIC-NEXT: movl %eax, 262144(%rcx,%rdi,4)
+; DARWIN-64-STATIC: leaq _dsrc(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl 262144([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-STATIC-NEXT: leaq _ddst(%rip), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl [[EAX]], 262144([[RCX]],%rdi,4)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _big03:
-; DARWIN-64-DYNAMIC: leaq _dsrc(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: movl 262144(%rax,%rdi,4), %eax
-; DARWIN-64-DYNAMIC-NEXT: leaq _ddst(%rip), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movl %eax, 262144(%rcx,%rdi,4)
+; DARWIN-64-DYNAMIC: leaq _dsrc(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl 262144([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-DYNAMIC-NEXT: leaq _ddst(%rip), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 262144([[RCX]],%rdi,4)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _big03:
-; DARWIN-64-PIC: leaq _dsrc(%rip), %rax
-; DARWIN-64-PIC-NEXT: movl 262144(%rax,%rdi,4), %eax
-; DARWIN-64-PIC-NEXT: leaq _ddst(%rip), %rcx
-; DARWIN-64-PIC-NEXT: movl %eax, 262144(%rcx,%rdi,4)
+; DARWIN-64-PIC: leaq _dsrc(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl 262144([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-PIC-NEXT: leaq _ddst(%rip), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl [[EAX]], 262144([[RCX]],%rdi,4)
; DARWIN-64-PIC-NEXT: ret
}
@@ -4440,66 +4451,66 @@ entry:
store i32* %0, i32** @dptr, align 8
ret void
; LINUX-64-STATIC: big04:
-; LINUX-64-STATIC: leaq ddst+262144(,%rdi,4), %rax
-; LINUX-64-STATIC: movq %rax, dptr
+; LINUX-64-STATIC: leaq ddst+262144(,%rdi,4), [[RAX:%r.x]]
+; LINUX-64-STATIC: movq [[RAX]], dptr
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: big04:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: leal ddst+262144(,%eax,4), %eax
-; LINUX-32-STATIC-NEXT: movl %eax, dptr
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: leal ddst+262144(,[[EAX]],4), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[EAX]], dptr
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: big04:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: leal ddst+262144(,%eax,4), %eax
-; LINUX-32-PIC-NEXT: movl %eax, dptr
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: leal ddst+262144(,[[EAX]],4), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[EAX]], dptr
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: big04:
-; LINUX-64-PIC: movq ddst@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
-; LINUX-64-PIC-NEXT: movq dptr@GOTPCREL(%rip), %rcx
-; LINUX-64-PIC-NEXT: movq %rax, (%rcx)
+; LINUX-64-PIC: movq ddst@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movq dptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movq [[RAX]], ([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _big04:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: leal _ddst+262144(,%eax,4), %eax
-; DARWIN-32-STATIC-NEXT: movl %eax, _dptr
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: leal _ddst+262144(,[[EAX]],4), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[EAX]], _dptr
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _big04:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: leal _ddst+262144(,%eax,4), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl %eax, _dptr
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: leal _ddst+262144(,[[EAX]],4), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], _dptr
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _big04:
; DARWIN-32-PIC: calll L61$pb
; DARWIN-32-PIC-NEXT: L61$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: leal (_ddst-L61$pb)+262144(%eax,%ecx,4), %ecx
-; DARWIN-32-PIC-NEXT: movl %ecx, _dptr-L61$pb(%eax)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal (_ddst-L61$pb)+262144([[EAX]],[[ECX]],4), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[ECX]], _dptr-L61$pb([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _big04:
-; DARWIN-64-STATIC: leaq _ddst(%rip), %rax
-; DARWIN-64-STATIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
-; DARWIN-64-STATIC-NEXT: movq %rax, _dptr(%rip)
+; DARWIN-64-STATIC: leaq _ddst(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: leaq 262144([[RAX]],%rdi,4), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movq [[RAX]], _dptr(%rip)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _big04:
-; DARWIN-64-DYNAMIC: leaq _ddst(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
-; DARWIN-64-DYNAMIC-NEXT: movq %rax, _dptr(%rip)
+; DARWIN-64-DYNAMIC: leaq _ddst(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: leaq 262144([[RAX]],%rdi,4), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], _dptr(%rip)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _big04:
-; DARWIN-64-PIC: leaq _ddst(%rip), %rax
-; DARWIN-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
-; DARWIN-64-PIC-NEXT: movq %rax, _dptr(%rip)
+; DARWIN-64-PIC: leaq _ddst(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movq [[RAX]], _dptr(%rip)
; DARWIN-64-PIC-NEXT: ret
}
@@ -4513,76 +4524,76 @@ entry:
store i32 %3, i32* %4, align 4
ret void
; LINUX-64-STATIC: big05:
-; LINUX-64-STATIC: movl dsrc+262144(,%rdi,4), %eax
-; LINUX-64-STATIC: movq dptr(%rip), %rcx
-; LINUX-64-STATIC: movl %eax, 262144(%rcx,%rdi,4)
+; LINUX-64-STATIC: movl dsrc+262144(,%rdi,4), [[EAX:%e.x]]
+; LINUX-64-STATIC: movq dptr(%rip), [[RCX:%r.x]]
+; LINUX-64-STATIC: movl [[EAX]], 262144([[RCX]],%rdi,4)
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: big05:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: movl dsrc+262144(,%eax,4), %ecx
-; LINUX-32-STATIC-NEXT: movl dptr, %edx
-; LINUX-32-STATIC-NEXT: movl %ecx, 262144(%edx,%eax,4)
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl dsrc+262144(,[[EAX]],4), [[ECX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl dptr, [[EDX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[ECX]], 262144([[EDX]],[[EAX]],4)
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: big05:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: movl dsrc+262144(,%eax,4), %ecx
-; LINUX-32-PIC-NEXT: movl dptr, %edx
-; LINUX-32-PIC-NEXT: movl %ecx, 262144(%edx,%eax,4)
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl dsrc+262144(,[[EAX]],4), [[ECX:%e.x]]
+; LINUX-32-PIC-NEXT: movl dptr, [[EDX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[ECX]], 262144([[EDX]],[[EAX]],4)
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: big05:
-; LINUX-64-PIC: movq dsrc@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: movl 262144(%rax,%rdi,4), %eax
-; LINUX-64-PIC-NEXT: movq dptr@GOTPCREL(%rip), %rcx
-; LINUX-64-PIC-NEXT: movq (%rcx), %rcx
-; LINUX-64-PIC-NEXT: movl %eax, 262144(%rcx,%rdi,4)
+; LINUX-64-PIC: movq dsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movl 262144([[RAX]],%rdi,4), [[EAX:%e.x]]
+; LINUX-64-PIC-NEXT: movq dptr@GOTPCREL(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movl [[EAX]], 262144([[RCX]],%rdi,4)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _big05:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: movl _dsrc+262144(,%eax,4), %ecx
-; DARWIN-32-STATIC-NEXT: movl _dptr, %edx
-; DARWIN-32-STATIC-NEXT: movl %ecx, 262144(%edx,%eax,4)
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl _dsrc+262144(,[[EAX]],4), [[ECX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl _dptr, [[EDX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[ECX]], 262144([[EDX]],[[EAX]],4)
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _big05:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl _dsrc+262144(,%eax,4), %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl _dptr, %edx
-; DARWIN-32-DYNAMIC-NEXT: movl %ecx, 262144(%edx,%eax,4)
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl _dsrc+262144(,[[EAX]],4), [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl _dptr, [[EDX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], 262144([[EDX]],[[EAX]],4)
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _big05:
; DARWIN-32-PIC: calll L62$pb
; DARWIN-32-PIC-NEXT: L62$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: movl (_dsrc-L62$pb)+262144(%eax,%ecx,4), %edx
-; DARWIN-32-PIC-NEXT: movl _dptr-L62$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: movl %edx, 262144(%eax,%ecx,4)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl (_dsrc-L62$pb)+262144([[EAX]],[[ECX]],4), [[EDX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl _dptr-L62$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[EDX]], 262144([[EAX]],[[ECX]],4)
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _big05:
-; DARWIN-64-STATIC: leaq _dsrc(%rip), %rax
-; DARWIN-64-STATIC-NEXT: movl 262144(%rax,%rdi,4), %eax
-; DARWIN-64-STATIC-NEXT: movq _dptr(%rip), %rcx
-; DARWIN-64-STATIC-NEXT: movl %eax, 262144(%rcx,%rdi,4)
+; DARWIN-64-STATIC: leaq _dsrc(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl 262144([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-STATIC-NEXT: movq _dptr(%rip), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl [[EAX]], 262144([[RCX]],%rdi,4)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _big05:
-; DARWIN-64-DYNAMIC: leaq _dsrc(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: movl 262144(%rax,%rdi,4), %eax
-; DARWIN-64-DYNAMIC-NEXT: movq _dptr(%rip), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movl %eax, 262144(%rcx,%rdi,4)
+; DARWIN-64-DYNAMIC: leaq _dsrc(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl 262144([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq _dptr(%rip), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 262144([[RCX]],%rdi,4)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _big05:
-; DARWIN-64-PIC: leaq _dsrc(%rip), %rax
-; DARWIN-64-PIC-NEXT: movl 262144(%rax,%rdi,4), %eax
-; DARWIN-64-PIC-NEXT: movq _dptr(%rip), %rcx
-; DARWIN-64-PIC-NEXT: movl %eax, 262144(%rcx,%rdi,4)
+; DARWIN-64-PIC: leaq _dsrc(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl 262144([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-PIC-NEXT: movq _dptr(%rip), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl [[EAX]], 262144([[RCX]],%rdi,4)
; DARWIN-64-PIC-NEXT: ret
}
@@ -4595,69 +4606,69 @@ entry:
store i32 %2, i32* %3, align 4
ret void
; LINUX-64-STATIC: big06:
-; LINUX-64-STATIC: movl lsrc+262144(,%rdi,4), %eax
-; LINUX-64-STATIC: movl %eax, ldst+262144(,%rdi,4)
+; LINUX-64-STATIC: movl lsrc+262144(,%rdi,4), [[EAX:%e.x]]
+; LINUX-64-STATIC: movl [[EAX]], ldst+262144(,%rdi,4)
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: big06:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: movl lsrc+262144(,%eax,4), %ecx
-; LINUX-32-STATIC-NEXT: movl %ecx, ldst+262144(,%eax,4)
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl lsrc+262144(,[[EAX]],4), [[ECX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[ECX]], ldst+262144(,[[EAX]],4)
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: big06:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: movl lsrc+262144(,%eax,4), %ecx
-; LINUX-32-PIC-NEXT: movl %ecx, ldst+262144(,%eax,4)
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl lsrc+262144(,[[EAX]],4), [[ECX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[ECX]], ldst+262144(,[[EAX]],4)
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: big06:
-; LINUX-64-PIC: leaq lsrc(%rip), %rax
-; LINUX-64-PIC-NEXT: movl 262144(%rax,%rdi,4), %eax
-; LINUX-64-PIC-NEXT: leaq ldst(%rip), %rcx
-; LINUX-64-PIC-NEXT: movl %eax, 262144(%rcx,%rdi,4)
+; LINUX-64-PIC: leaq lsrc(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movl 262144([[RAX]],%rdi,4), [[EAX:%e.x]]
+; LINUX-64-PIC-NEXT: leaq ldst(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movl [[EAX]], 262144([[RCX]],%rdi,4)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _big06:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: movl _lsrc+262144(,%eax,4), %ecx
-; DARWIN-32-STATIC-NEXT: movl %ecx, _ldst+262144(,%eax,4)
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl _lsrc+262144(,[[EAX]],4), [[ECX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[ECX]], _ldst+262144(,[[EAX]],4)
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _big06:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl _lsrc+262144(,%eax,4), %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl %ecx, _ldst+262144(,%eax,4)
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl _lsrc+262144(,[[EAX]],4), [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], _ldst+262144(,[[EAX]],4)
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _big06:
; DARWIN-32-PIC: calll L63$pb
; DARWIN-32-PIC-NEXT: L63$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: movl (_lsrc-L63$pb)+262144(%eax,%ecx,4), %edx
-; DARWIN-32-PIC-NEXT: movl %edx, (_ldst-L63$pb)+262144(%eax,%ecx,4)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl (_lsrc-L63$pb)+262144([[EAX]],[[ECX]],4), [[EDX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[EDX]], (_ldst-L63$pb)+262144([[EAX]],[[ECX]],4)
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _big06:
-; DARWIN-64-STATIC: leaq _lsrc(%rip), %rax
-; DARWIN-64-STATIC-NEXT: movl 262144(%rax,%rdi,4), %eax
-; DARWIN-64-STATIC-NEXT: leaq _ldst(%rip), %rcx
-; DARWIN-64-STATIC-NEXT: movl %eax, 262144(%rcx,%rdi,4)
+; DARWIN-64-STATIC: leaq _lsrc(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl 262144([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-STATIC-NEXT: leaq _ldst(%rip), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl [[EAX]], 262144([[RCX]],%rdi,4)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _big06:
-; DARWIN-64-DYNAMIC: leaq _lsrc(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: movl 262144(%rax,%rdi,4), %eax
-; DARWIN-64-DYNAMIC-NEXT: leaq _ldst(%rip), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movl %eax, 262144(%rcx,%rdi,4)
+; DARWIN-64-DYNAMIC: leaq _lsrc(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl 262144([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-DYNAMIC-NEXT: leaq _ldst(%rip), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 262144([[RCX]],%rdi,4)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _big06:
-; DARWIN-64-PIC: leaq _lsrc(%rip), %rax
-; DARWIN-64-PIC-NEXT: movl 262144(%rax,%rdi,4), %eax
-; DARWIN-64-PIC-NEXT: leaq _ldst(%rip), %rcx
-; DARWIN-64-PIC-NEXT: movl %eax, 262144(%rcx,%rdi,4)
+; DARWIN-64-PIC: leaq _lsrc(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl 262144([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-PIC-NEXT: leaq _ldst(%rip), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl [[EAX]], 262144([[RCX]],%rdi,4)
; DARWIN-64-PIC-NEXT: ret
}
@@ -4668,65 +4679,65 @@ entry:
store i32* %0, i32** @lptr, align 8
ret void
; LINUX-64-STATIC: big07:
-; LINUX-64-STATIC: leaq ldst+262144(,%rdi,4), %rax
-; LINUX-64-STATIC: movq %rax, lptr
+; LINUX-64-STATIC: leaq ldst+262144(,%rdi,4), [[RAX:%r.x]]
+; LINUX-64-STATIC: movq [[RAX]], lptr
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: big07:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: leal ldst+262144(,%eax,4), %eax
-; LINUX-32-STATIC-NEXT: movl %eax, lptr
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: leal ldst+262144(,[[EAX]],4), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[EAX]], lptr
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: big07:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: leal ldst+262144(,%eax,4), %eax
-; LINUX-32-PIC-NEXT: movl %eax, lptr
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: leal ldst+262144(,[[EAX]],4), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[EAX]], lptr
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: big07:
-; LINUX-64-PIC: leaq ldst(%rip), %rax
-; LINUX-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
-; LINUX-64-PIC-NEXT: movq %rax, lptr(%rip)
+; LINUX-64-PIC: leaq ldst(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movq [[RAX]], lptr(%rip)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _big07:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: leal _ldst+262144(,%eax,4), %eax
-; DARWIN-32-STATIC-NEXT: movl %eax, _lptr
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: leal _ldst+262144(,[[EAX]],4), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[EAX]], _lptr
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _big07:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: leal _ldst+262144(,%eax,4), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl %eax, _lptr
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: leal _ldst+262144(,[[EAX]],4), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], _lptr
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _big07:
; DARWIN-32-PIC: calll L64$pb
; DARWIN-32-PIC-NEXT: L64$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: leal (_ldst-L64$pb)+262144(%eax,%ecx,4), %ecx
-; DARWIN-32-PIC-NEXT: movl %ecx, _lptr-L64$pb(%eax)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal (_ldst-L64$pb)+262144([[EAX]],[[ECX]],4), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[ECX]], _lptr-L64$pb([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _big07:
-; DARWIN-64-STATIC: leaq _ldst(%rip), %rax
-; DARWIN-64-STATIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
-; DARWIN-64-STATIC-NEXT: movq %rax, _lptr(%rip)
+; DARWIN-64-STATIC: leaq _ldst(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: leaq 262144([[RAX]],%rdi,4), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movq [[RAX]], _lptr(%rip)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _big07:
-; DARWIN-64-DYNAMIC: leaq _ldst(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
-; DARWIN-64-DYNAMIC-NEXT: movq %rax, _lptr(%rip)
+; DARWIN-64-DYNAMIC: leaq _ldst(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: leaq 262144([[RAX]],%rdi,4), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], _lptr(%rip)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _big07:
-; DARWIN-64-PIC: leaq _ldst(%rip), %rax
-; DARWIN-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
-; DARWIN-64-PIC-NEXT: movq %rax, _lptr(%rip)
+; DARWIN-64-PIC: leaq _ldst(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movq [[RAX]], _lptr(%rip)
; DARWIN-64-PIC-NEXT: ret
}
@@ -4740,75 +4751,75 @@ entry:
store i32 %3, i32* %4, align 4
ret void
; LINUX-64-STATIC: big08:
-; LINUX-64-STATIC: movl lsrc+262144(,%rdi,4), %eax
-; LINUX-64-STATIC: movq lptr(%rip), %rcx
-; LINUX-64-STATIC: movl %eax, 262144(%rcx,%rdi,4)
+; LINUX-64-STATIC: movl lsrc+262144(,%rdi,4), [[EAX:%e.x]]
+; LINUX-64-STATIC: movq lptr(%rip), [[RCX:%r.x]]
+; LINUX-64-STATIC: movl [[EAX]], 262144([[RCX]],%rdi,4)
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: big08:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: movl lsrc+262144(,%eax,4), %ecx
-; LINUX-32-STATIC-NEXT: movl lptr, %edx
-; LINUX-32-STATIC-NEXT: movl %ecx, 262144(%edx,%eax,4)
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl lsrc+262144(,[[EAX]],4), [[ECX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl lptr, [[EDX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl [[ECX]], 262144([[EDX]],[[EAX]],4)
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: big08:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: movl lsrc+262144(,%eax,4), %ecx
-; LINUX-32-PIC-NEXT: movl lptr, %edx
-; LINUX-32-PIC-NEXT: movl %ecx, 262144(%edx,%eax,4)
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl lsrc+262144(,[[EAX]],4), [[ECX:%e.x]]
+; LINUX-32-PIC-NEXT: movl lptr, [[EDX:%e.x]]
+; LINUX-32-PIC-NEXT: movl [[ECX]], 262144([[EDX]],[[EAX]],4)
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: big08:
-; LINUX-64-PIC: leaq lsrc(%rip), %rax
-; LINUX-64-PIC-NEXT: movl 262144(%rax,%rdi,4), %eax
-; LINUX-64-PIC-NEXT: movq lptr(%rip), %rcx
-; LINUX-64-PIC-NEXT: movl %eax, 262144(%rcx,%rdi,4)
+; LINUX-64-PIC: leaq lsrc(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movl 262144([[RAX]],%rdi,4), [[EAX:%e.x]]
+; LINUX-64-PIC-NEXT: movq lptr(%rip), [[RCX:%r.x]]
+; LINUX-64-PIC-NEXT: movl [[EAX]], 262144([[RCX]],%rdi,4)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _big08:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: movl _lsrc+262144(,%eax,4), %ecx
-; DARWIN-32-STATIC-NEXT: movl _lptr, %edx
-; DARWIN-32-STATIC-NEXT: movl %ecx, 262144(%edx,%eax,4)
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl _lsrc+262144(,[[EAX]],4), [[ECX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl _lptr, [[EDX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl [[ECX]], 262144([[EDX]],[[EAX]],4)
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _big08:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl _lsrc+262144(,%eax,4), %ecx
-; DARWIN-32-DYNAMIC-NEXT: movl _lptr, %edx
-; DARWIN-32-DYNAMIC-NEXT: movl %ecx, 262144(%edx,%eax,4)
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl _lsrc+262144(,[[EAX]],4), [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl _lptr, [[EDX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], 262144([[EDX]],[[EAX]],4)
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _big08:
; DARWIN-32-PIC: calll L65$pb
; DARWIN-32-PIC-NEXT: L65$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: movl (_lsrc-L65$pb)+262144(%eax,%ecx,4), %edx
-; DARWIN-32-PIC-NEXT: movl _lptr-L65$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: movl %edx, 262144(%eax,%ecx,4)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl (_lsrc-L65$pb)+262144([[EAX]],[[ECX]],4), [[EDX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl _lptr-L65$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl [[EDX]], 262144([[EAX]],[[ECX]],4)
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _big08:
-; DARWIN-64-STATIC: leaq _lsrc(%rip), %rax
-; DARWIN-64-STATIC-NEXT: movl 262144(%rax,%rdi,4), %eax
-; DARWIN-64-STATIC-NEXT: movq _lptr(%rip), %rcx
-; DARWIN-64-STATIC-NEXT: movl %eax, 262144(%rcx,%rdi,4)
+; DARWIN-64-STATIC: leaq _lsrc(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl 262144([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-STATIC-NEXT: movq _lptr(%rip), [[RCX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movl [[EAX]], 262144([[RCX]],%rdi,4)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _big08:
-; DARWIN-64-DYNAMIC: leaq _lsrc(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: movl 262144(%rax,%rdi,4), %eax
-; DARWIN-64-DYNAMIC-NEXT: movq _lptr(%rip), %rcx
-; DARWIN-64-DYNAMIC-NEXT: movl %eax, 262144(%rcx,%rdi,4)
+; DARWIN-64-DYNAMIC: leaq _lsrc(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl 262144([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq _lptr(%rip), [[RCX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 262144([[RCX]],%rdi,4)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _big08:
-; DARWIN-64-PIC: leaq _lsrc(%rip), %rax
-; DARWIN-64-PIC-NEXT: movl 262144(%rax,%rdi,4), %eax
-; DARWIN-64-PIC-NEXT: movq _lptr(%rip), %rcx
-; DARWIN-64-PIC-NEXT: movl %eax, 262144(%rcx,%rdi,4)
+; DARWIN-64-PIC: leaq _lsrc(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl 262144([[RAX]],%rdi,4), [[EAX:%e.x]]
+; DARWIN-64-PIC-NEXT: movq _lptr(%rip), [[RCX:%r.x]]
+; DARWIN-64-PIC-NEXT: movl [[EAX]], 262144([[RCX]],%rdi,4)
; DARWIN-64-PIC-NEXT: ret
}
@@ -4842,8 +4853,8 @@ entry:
; DARWIN-32-PIC: _bar00:
; DARWIN-32-PIC: calll L66$pb
; DARWIN-32-PIC-NEXT: L66$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L66$pb(%eax), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L66$pb([[EAX]]), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _bar00:
@@ -4889,8 +4900,8 @@ entry:
; DARWIN-32-PIC: _bxr00:
; DARWIN-32-PIC: calll L67$pb
; DARWIN-32-PIC-NEXT: L67$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L67$pb(%eax), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L67$pb([[EAX]]), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _bxr00:
@@ -4936,8 +4947,8 @@ entry:
; DARWIN-32-PIC: _bar01:
; DARWIN-32-PIC: calll L68$pb
; DARWIN-32-PIC-NEXT: L68$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L68$pb(%eax), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L68$pb([[EAX]]), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _bar01:
@@ -4983,8 +4994,8 @@ entry:
; DARWIN-32-PIC: _bxr01:
; DARWIN-32-PIC: calll L69$pb
; DARWIN-32-PIC-NEXT: L69$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L69$pb(%eax), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L69$pb([[EAX]]), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _bxr01:
@@ -5030,8 +5041,8 @@ entry:
; DARWIN-32-PIC: _bar02:
; DARWIN-32-PIC: calll L70$pb
; DARWIN-32-PIC-NEXT: L70$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L70$pb(%eax), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L70$pb([[EAX]]), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _bar02:
@@ -5077,8 +5088,8 @@ entry:
; DARWIN-32-PIC: _bar03:
; DARWIN-32-PIC: calll L71$pb
; DARWIN-32-PIC-NEXT: L71$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: leal _dsrc-L71$pb(%eax), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal _dsrc-L71$pb([[EAX]]), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _bar03:
@@ -5124,8 +5135,8 @@ entry:
; DARWIN-32-PIC: _bar04:
; DARWIN-32-PIC: calll L72$pb
; DARWIN-32-PIC-NEXT: L72$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: leal _ddst-L72$pb(%eax), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal _ddst-L72$pb([[EAX]]), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _bar04:
@@ -5171,8 +5182,8 @@ entry:
; DARWIN-32-PIC: _bar05:
; DARWIN-32-PIC: calll L73$pb
; DARWIN-32-PIC-NEXT: L73$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: leal _dptr-L73$pb(%eax), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal _dptr-L73$pb([[EAX]]), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _bar05:
@@ -5218,8 +5229,8 @@ entry:
; DARWIN-32-PIC: _bar06:
; DARWIN-32-PIC: calll L74$pb
; DARWIN-32-PIC-NEXT: L74$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: leal _lsrc-L74$pb(%eax), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal _lsrc-L74$pb([[EAX]]), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _bar06:
@@ -5265,8 +5276,8 @@ entry:
; DARWIN-32-PIC: _bar07:
; DARWIN-32-PIC: calll L75$pb
; DARWIN-32-PIC-NEXT: L75$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: leal _ldst-L75$pb(%eax), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal _ldst-L75$pb([[EAX]]), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _bar07:
@@ -5312,8 +5323,8 @@ entry:
; DARWIN-32-PIC: _bar08:
; DARWIN-32-PIC: calll L76$pb
; DARWIN-32-PIC-NEXT: L76$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: leal _lptr-L76$pb(%eax), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal _lptr-L76$pb([[EAX]]), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _bar08:
@@ -5359,8 +5370,8 @@ entry:
; DARWIN-32-PIC: _har00:
; DARWIN-32-PIC: calll L77$pb
; DARWIN-32-PIC-NEXT: L77$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L77$pb(%eax), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L77$pb([[EAX]]), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _har00:
@@ -5406,8 +5417,8 @@ entry:
; DARWIN-32-PIC: _hxr00:
; DARWIN-32-PIC: calll L78$pb
; DARWIN-32-PIC-NEXT: L78$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L78$pb(%eax), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L78$pb([[EAX]]), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _hxr00:
@@ -5453,8 +5464,8 @@ entry:
; DARWIN-32-PIC: _har01:
; DARWIN-32-PIC: calll L79$pb
; DARWIN-32-PIC-NEXT: L79$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L79$pb(%eax), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L79$pb([[EAX]]), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _har01:
@@ -5500,8 +5511,8 @@ entry:
; DARWIN-32-PIC: _hxr01:
; DARWIN-32-PIC: calll L80$pb
; DARWIN-32-PIC-NEXT: L80$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L80$pb(%eax), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L80$pb([[EAX]]), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _hxr01:
@@ -5535,8 +5546,8 @@ entry:
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: har02:
-; LINUX-64-PIC: movq ptr@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: movq (%rax), %rax
+; LINUX-64-PIC: movq ptr@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movq ([[RAX]]), %rax
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _har02:
@@ -5544,31 +5555,31 @@ entry:
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _har02:
-; DARWIN-32-DYNAMIC: movl L_ptr$non_lazy_ptr, %eax
-; DARWIN-32-DYNAMIC-NEXT: movl (%eax), %eax
+; DARWIN-32-DYNAMIC: movl L_ptr$non_lazy_ptr, [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl ([[EAX]]), %eax
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _har02:
; DARWIN-32-PIC: calll L81$pb
; DARWIN-32-PIC-NEXT: L81$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L81$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: movl (%eax), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L81$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl ([[EAX]]), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _har02:
-; DARWIN-64-STATIC: movq _ptr@GOTPCREL(%rip), %rax
-; DARWIN-64-STATIC-NEXT: movq (%rax), %rax
+; DARWIN-64-STATIC: movq _ptr@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movq ([[RAX]]), %rax
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _har02:
-; DARWIN-64-DYNAMIC: movq _ptr@GOTPCREL(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: movq (%rax), %rax
+; DARWIN-64-DYNAMIC: movq _ptr@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq ([[RAX]]), %rax
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _har02:
-; DARWIN-64-PIC: movq _ptr@GOTPCREL(%rip), %rax
-; DARWIN-64-PIC-NEXT: movq (%rax), %rax
+; DARWIN-64-PIC: movq _ptr@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movq ([[RAX]]), %rax
; DARWIN-64-PIC-NEXT: ret
}
@@ -5602,8 +5613,8 @@ entry:
; DARWIN-32-PIC: _har03:
; DARWIN-32-PIC: calll L82$pb
; DARWIN-32-PIC-NEXT: L82$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: leal _dsrc-L82$pb(%eax), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal _dsrc-L82$pb([[EAX]]), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _har03:
@@ -5649,8 +5660,8 @@ entry:
; DARWIN-32-PIC: _har04:
; DARWIN-32-PIC: calll L83$pb
; DARWIN-32-PIC-NEXT: L83$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: leal _ddst-L83$pb(%eax), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal _ddst-L83$pb([[EAX]]), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _har04:
@@ -5684,8 +5695,8 @@ entry:
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: har05:
-; LINUX-64-PIC: movq dptr@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: movq (%rax), %rax
+; LINUX-64-PIC: movq dptr@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movq ([[RAX]]), %rax
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _har05:
@@ -5699,8 +5710,8 @@ entry:
; DARWIN-32-PIC: _har05:
; DARWIN-32-PIC: calll L84$pb
; DARWIN-32-PIC-NEXT: L84$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl _dptr-L84$pb(%eax), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl _dptr-L84$pb([[EAX]]), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _har05:
@@ -5746,8 +5757,8 @@ entry:
; DARWIN-32-PIC: _har06:
; DARWIN-32-PIC: calll L85$pb
; DARWIN-32-PIC-NEXT: L85$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: leal _lsrc-L85$pb(%eax), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal _lsrc-L85$pb([[EAX]]), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _har06:
@@ -5793,8 +5804,8 @@ entry:
; DARWIN-32-PIC: _har07:
; DARWIN-32-PIC: calll L86$pb
; DARWIN-32-PIC-NEXT: L86$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: leal _ldst-L86$pb(%eax), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal _ldst-L86$pb([[EAX]]), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _har07:
@@ -5842,8 +5853,8 @@ entry:
; DARWIN-32-PIC: _har08:
; DARWIN-32-PIC: calll L87$pb
; DARWIN-32-PIC-NEXT: L87$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl _lptr-L87$pb(%eax), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl _lptr-L87$pb([[EAX]]), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _har08:
@@ -5891,8 +5902,8 @@ entry:
; DARWIN-32-PIC: _bat00:
; DARWIN-32-PIC: calll L88$pb
; DARWIN-32-PIC-NEXT: L88$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L88$pb(%eax), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L88$pb([[EAX]]), %eax
; DARWIN-32-PIC-NEXT: addl $64, %eax
; DARWIN-32-PIC-NEXT: ret
@@ -5944,8 +5955,8 @@ entry:
; DARWIN-32-PIC: _bxt00:
; DARWIN-32-PIC: calll L89$pb
; DARWIN-32-PIC-NEXT: L89$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L89$pb(%eax), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L89$pb([[EAX]]), %eax
; DARWIN-32-PIC-NEXT: addl $64, %eax
; DARWIN-32-PIC-NEXT: ret
@@ -5997,8 +6008,8 @@ entry:
; DARWIN-32-PIC: _bat01:
; DARWIN-32-PIC: calll L90$pb
; DARWIN-32-PIC-NEXT: L90$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L90$pb(%eax), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L90$pb([[EAX]]), %eax
; DARWIN-32-PIC-NEXT: addl $64, %eax
; DARWIN-32-PIC-NEXT: ret
@@ -6050,8 +6061,8 @@ entry:
; DARWIN-32-PIC: _bxt01:
; DARWIN-32-PIC: calll L91$pb
; DARWIN-32-PIC-NEXT: L91$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L91$pb(%eax), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L91$pb([[EAX]]), %eax
; DARWIN-32-PIC-NEXT: addl $64, %eax
; DARWIN-32-PIC-NEXT: ret
@@ -6093,8 +6104,8 @@ entry:
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: bat02:
-; LINUX-64-PIC: movq ptr@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: movq (%rax), %rax
+; LINUX-64-PIC: movq ptr@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movq ([[RAX]]), %rax
; LINUX-64-PIC-NEXT: addq $64, %rax
; LINUX-64-PIC-NEXT: ret
@@ -6104,35 +6115,35 @@ entry:
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _bat02:
-; DARWIN-32-DYNAMIC: movl L_ptr$non_lazy_ptr, %eax
-; DARWIN-32-DYNAMIC-NEXT: movl (%eax), %eax
+; DARWIN-32-DYNAMIC: movl L_ptr$non_lazy_ptr, [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl ([[EAX]]), [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: addl $64, %eax
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _bat02:
; DARWIN-32-PIC: calll L92$pb
; DARWIN-32-PIC-NEXT: L92$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L92$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: movl (%eax), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L92$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl ([[EAX]]), %eax
; DARWIN-32-PIC-NEXT: addl $64, %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _bat02:
-; DARWIN-64-STATIC: movq _ptr@GOTPCREL(%rip), %rax
-; DARWIN-64-STATIC-NEXT: movq (%rax), %rax
+; DARWIN-64-STATIC: movq _ptr@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movq ([[RAX]]), %rax
; DARWIN-64-STATIC-NEXT: addq $64, %rax
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _bat02:
-; DARWIN-64-DYNAMIC: movq _ptr@GOTPCREL(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: movq (%rax), %rax
+; DARWIN-64-DYNAMIC: movq _ptr@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq ([[RAX]]), [[RAX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: addq $64, %rax
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _bat02:
-; DARWIN-64-PIC: movq _ptr@GOTPCREL(%rip), %rax
-; DARWIN-64-PIC-NEXT: movq (%rax), %rax
+; DARWIN-64-PIC: movq _ptr@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movq ([[RAX]]), %rax
; DARWIN-64-PIC-NEXT: addq $64, %rax
; DARWIN-64-PIC-NEXT: ret
}
@@ -6168,8 +6179,8 @@ entry:
; DARWIN-32-PIC: _bat03:
; DARWIN-32-PIC: calll L93$pb
; DARWIN-32-PIC-NEXT: L93$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: leal (_dsrc-L93$pb)+64(%eax), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal (_dsrc-L93$pb)+64([[EAX]]), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _bat03:
@@ -6216,8 +6227,8 @@ entry:
; DARWIN-32-PIC: _bat04:
; DARWIN-32-PIC: calll L94$pb
; DARWIN-32-PIC-NEXT: L94$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: leal (_ddst-L94$pb)+64(%eax), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal (_ddst-L94$pb)+64([[EAX]]), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _bat04:
@@ -6255,8 +6266,8 @@ entry:
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: bat05:
-; LINUX-64-PIC: movq dptr@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: movq (%rax), %rax
+; LINUX-64-PIC: movq dptr@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movq ([[RAX]]), %rax
; LINUX-64-PIC-NEXT: addq $64, %rax
; LINUX-64-PIC-NEXT: ret
@@ -6273,8 +6284,8 @@ entry:
; DARWIN-32-PIC: _bat05:
; DARWIN-32-PIC: calll L95$pb
; DARWIN-32-PIC-NEXT: L95$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl _dptr-L95$pb(%eax), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl _dptr-L95$pb([[EAX]]), %eax
; DARWIN-32-PIC-NEXT: addl $64, %eax
; DARWIN-32-PIC-NEXT: ret
@@ -6324,8 +6335,8 @@ entry:
; DARWIN-32-PIC: _bat06:
; DARWIN-32-PIC: calll L96$pb
; DARWIN-32-PIC-NEXT: L96$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: leal (_lsrc-L96$pb)+64(%eax), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal (_lsrc-L96$pb)+64([[EAX]]), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _bat06:
@@ -6371,8 +6382,8 @@ entry:
; DARWIN-32-PIC: _bat07:
; DARWIN-32-PIC: calll L97$pb
; DARWIN-32-PIC-NEXT: L97$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: leal (_ldst-L97$pb)+64(%eax), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal (_ldst-L97$pb)+64([[EAX]]), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _bat07:
@@ -6427,8 +6438,8 @@ entry:
; DARWIN-32-PIC: _bat08:
; DARWIN-32-PIC: calll L98$pb
; DARWIN-32-PIC-NEXT: L98$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl _lptr-L98$pb(%eax), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl _lptr-L98$pb([[EAX]]), %eax
; DARWIN-32-PIC-NEXT: addl $64, %eax
; DARWIN-32-PIC-NEXT: ret
@@ -6480,9 +6491,9 @@ entry:
; DARWIN-32-PIC: _bam00:
; DARWIN-32-PIC: calll L99$pb
; DARWIN-32-PIC-NEXT: L99$pb:
-; DARWIN-32-PIC-NEXT: popl %ecx
+; DARWIN-32-PIC-NEXT: popl [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl $262144, %eax
-; DARWIN-32-PIC-NEXT: addl L_src$non_lazy_ptr-L99$pb(%ecx), %eax
+; DARWIN-32-PIC-NEXT: addl L_src$non_lazy_ptr-L99$pb([[ECX]]), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _bam00:
@@ -6533,9 +6544,9 @@ entry:
; DARWIN-32-PIC: _bam01:
; DARWIN-32-PIC: calll L100$pb
; DARWIN-32-PIC-NEXT: L100$pb:
-; DARWIN-32-PIC-NEXT: popl %ecx
+; DARWIN-32-PIC-NEXT: popl [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl $262144, %eax
-; DARWIN-32-PIC-NEXT: addl L_dst$non_lazy_ptr-L100$pb(%ecx), %eax
+; DARWIN-32-PIC-NEXT: addl L_dst$non_lazy_ptr-L100$pb([[ECX]]), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _bam01:
@@ -6586,9 +6597,9 @@ entry:
; DARWIN-32-PIC: _bxm01:
; DARWIN-32-PIC: calll L101$pb
; DARWIN-32-PIC-NEXT: L101$pb:
-; DARWIN-32-PIC-NEXT: popl %ecx
+; DARWIN-32-PIC-NEXT: popl [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl $262144, %eax
-; DARWIN-32-PIC-NEXT: addl L_xdst$non_lazy_ptr-L101$pb(%ecx), %eax
+; DARWIN-32-PIC-NEXT: addl L_xdst$non_lazy_ptr-L101$pb([[ECX]]), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _bxm01:
@@ -6629,9 +6640,9 @@ entry:
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: bam02:
-; LINUX-64-PIC: movq ptr@GOTPCREL(%rip), %rcx
+; LINUX-64-PIC: movq ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movl $262144, %eax
-; LINUX-64-PIC-NEXT: addq (%rcx), %rax
+; LINUX-64-PIC-NEXT: addq ([[RCX]]), %rax
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _bam02:
@@ -6640,36 +6651,36 @@ entry:
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _bam02:
-; DARWIN-32-DYNAMIC: movl L_ptr$non_lazy_ptr, %ecx
+; DARWIN-32-DYNAMIC: movl L_ptr$non_lazy_ptr, [[ECX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl $262144, %eax
-; DARWIN-32-DYNAMIC-NEXT: addl (%ecx), %eax
+; DARWIN-32-DYNAMIC-NEXT: addl ([[ECX]]), %eax
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _bam02:
; DARWIN-32-PIC: calll L102$pb
; DARWIN-32-PIC-NEXT: L102$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L102$pb(%eax), %ecx
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L102$pb([[EAX]]), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl $262144, %eax
-; DARWIN-32-PIC-NEXT: addl (%ecx), %eax
+; DARWIN-32-PIC-NEXT: addl ([[ECX]]), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _bam02:
-; DARWIN-64-STATIC: movq _ptr@GOTPCREL(%rip), %rcx
+; DARWIN-64-STATIC: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-STATIC-NEXT: movl $262144, %eax
-; DARWIN-64-STATIC-NEXT: addq (%rcx), %rax
+; DARWIN-64-STATIC-NEXT: addq ([[RCX]]), %rax
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _bam02:
-; DARWIN-64-DYNAMIC: movq _ptr@GOTPCREL(%rip), %rcx
+; DARWIN-64-DYNAMIC: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movl $262144, %eax
-; DARWIN-64-DYNAMIC-NEXT: addq (%rcx), %rax
+; DARWIN-64-DYNAMIC-NEXT: addq ([[RCX]]), %rax
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _bam02:
-; DARWIN-64-PIC: movq _ptr@GOTPCREL(%rip), %rcx
+; DARWIN-64-PIC: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-PIC-NEXT: movl $262144, %eax
-; DARWIN-64-PIC-NEXT: addq (%rcx), %rax
+; DARWIN-64-PIC-NEXT: addq ([[RCX]]), %rax
; DARWIN-64-PIC-NEXT: ret
}
@@ -6704,8 +6715,8 @@ entry:
; DARWIN-32-PIC: _bam03:
; DARWIN-32-PIC: calll L103$pb
; DARWIN-32-PIC-NEXT: L103$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: leal (_dsrc-L103$pb)+262144(%eax), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal (_dsrc-L103$pb)+262144([[EAX]]), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _bam03:
@@ -6752,8 +6763,8 @@ entry:
; DARWIN-32-PIC: _bam04:
; DARWIN-32-PIC: calll L104$pb
; DARWIN-32-PIC-NEXT: L104$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: leal (_ddst-L104$pb)+262144(%eax), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal (_ddst-L104$pb)+262144([[EAX]]), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _bam04:
@@ -6791,9 +6802,9 @@ entry:
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: bam05:
-; LINUX-64-PIC: movq dptr@GOTPCREL(%rip), %rcx
+; LINUX-64-PIC: movq dptr@GOTPCREL(%rip), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movl $262144, %eax
-; LINUX-64-PIC-NEXT: addq (%rcx), %rax
+; LINUX-64-PIC-NEXT: addq ([[RCX]]), %rax
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _bam05:
@@ -6809,9 +6820,9 @@ entry:
; DARWIN-32-PIC: _bam05:
; DARWIN-32-PIC: calll L105$pb
; DARWIN-32-PIC-NEXT: L105$pb:
-; DARWIN-32-PIC-NEXT: popl %ecx
+; DARWIN-32-PIC-NEXT: popl [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl $262144, %eax
-; DARWIN-32-PIC-NEXT: addl _dptr-L105$pb(%ecx), %eax
+; DARWIN-32-PIC-NEXT: addl _dptr-L105$pb([[ECX]]), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _bam05:
@@ -6860,8 +6871,8 @@ entry:
; DARWIN-32-PIC: _bam06:
; DARWIN-32-PIC: calll L106$pb
; DARWIN-32-PIC-NEXT: L106$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: leal (_lsrc-L106$pb)+262144(%eax), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal (_lsrc-L106$pb)+262144([[EAX]]), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _bam06:
@@ -6908,7 +6919,7 @@ entry:
; DARWIN-32-PIC: calll L107$pb
; DARWIN-32-PIC-NEXT: L107$pb:
; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: leal (_ldst-L107$pb)+262144(%eax), %eax
+; DARWIN-32-PIC-NEXT: leal (_ldst-L107$pb)+262144([[EAX]]), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _bam07:
@@ -6963,9 +6974,9 @@ entry:
; DARWIN-32-PIC: _bam08:
; DARWIN-32-PIC: calll L108$pb
; DARWIN-32-PIC-NEXT: L108$pb:
-; DARWIN-32-PIC-NEXT: popl %ecx
+; DARWIN-32-PIC-NEXT: popl [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl $262144, %eax
-; DARWIN-32-PIC-NEXT: addl _lptr-L108$pb(%ecx), %eax
+; DARWIN-32-PIC-NEXT: addl _lptr-L108$pb([[ECX]]), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _bam08:
@@ -6995,53 +7006,53 @@ entry:
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: cat00:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: leal src+64(,%eax,4), %eax
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: leal src+64(,[[EAX]],4), %eax
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: cat00:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: leal src+64(,%eax,4), %eax
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: leal src+64(,[[EAX]],4), %eax
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: cat00:
-; LINUX-64-PIC: movq src@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax
+; LINUX-64-PIC: movq src@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _cat00:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: leal _src+64(,%eax,4), %eax
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: leal _src+64(,[[EAX]],4), %eax
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _cat00:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl L_src$non_lazy_ptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: leal 64(%ecx,%eax,4), %eax
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_src$non_lazy_ptr, [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: leal 64([[ECX]],[[EAX]],4), %eax
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _cat00:
; DARWIN-32-PIC: calll L109$pb
; DARWIN-32-PIC-NEXT: L109$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L109$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: leal 64(%eax,%ecx,4), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L109$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal 64([[EAX]],[[ECX]],4), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _cat00:
-; DARWIN-64-STATIC: movq _src@GOTPCREL(%rip), %rax
-; DARWIN-64-STATIC-NEXT: leaq 64(%rax,%rdi,4), %rax
+; DARWIN-64-STATIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _cat00:
-; DARWIN-64-DYNAMIC: movq _src@GOTPCREL(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: leaq 64(%rax,%rdi,4), %rax
+; DARWIN-64-DYNAMIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _cat00:
-; DARWIN-64-PIC: movq _src@GOTPCREL(%rip), %rax
-; DARWIN-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax
+; DARWIN-64-PIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax
; DARWIN-64-PIC-NEXT: ret
}
@@ -7056,53 +7067,53 @@ entry:
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: cxt00:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: leal xsrc+64(,%eax,4), %eax
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: leal xsrc+64(,[[EAX]],4), %eax
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: cxt00:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: leal xsrc+64(,%eax,4), %eax
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: leal xsrc+64(,[[EAX]],4), %eax
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: cxt00:
-; LINUX-64-PIC: movq xsrc@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax
+; LINUX-64-PIC: movq xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _cxt00:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: leal _xsrc+64(,%eax,4), %eax
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: leal _xsrc+64(,[[EAX]],4), %eax
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _cxt00:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl L_xsrc$non_lazy_ptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: leal 64(%ecx,%eax,4), %eax
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_xsrc$non_lazy_ptr, [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: leal 64([[ECX]],[[EAX]],4), %eax
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _cxt00:
; DARWIN-32-PIC: calll L110$pb
; DARWIN-32-PIC-NEXT: L110$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L110$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: leal 64(%eax,%ecx,4), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L110$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal 64([[EAX]],[[ECX]],4), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _cxt00:
-; DARWIN-64-STATIC: movq _xsrc@GOTPCREL(%rip), %rax
-; DARWIN-64-STATIC-NEXT: leaq 64(%rax,%rdi,4), %rax
+; DARWIN-64-STATIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _cxt00:
-; DARWIN-64-DYNAMIC: movq _xsrc@GOTPCREL(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: leaq 64(%rax,%rdi,4), %rax
+; DARWIN-64-DYNAMIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _cxt00:
-; DARWIN-64-PIC: movq _xsrc@GOTPCREL(%rip), %rax
-; DARWIN-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax
+; DARWIN-64-PIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax
; DARWIN-64-PIC-NEXT: ret
}
@@ -7117,53 +7128,53 @@ entry:
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: cat01:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: leal dst+64(,%eax,4), %eax
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: leal dst+64(,[[EAX]],4), %eax
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: cat01:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: leal dst+64(,%eax,4), %eax
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: leal dst+64(,[[EAX]],4), %eax
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: cat01:
-; LINUX-64-PIC: movq dst@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax
+; LINUX-64-PIC: movq dst@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _cat01:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: leal _dst+64(,%eax,4), %eax
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: leal _dst+64(,[[EAX]],4), %eax
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _cat01:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl L_dst$non_lazy_ptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: leal 64(%ecx,%eax,4), %eax
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_dst$non_lazy_ptr, [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: leal 64([[ECX]],[[EAX]],4), %eax
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _cat01:
; DARWIN-32-PIC: calll L111$pb
; DARWIN-32-PIC-NEXT: L111$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L111$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: leal 64(%eax,%ecx,4), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L111$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal 64([[EAX]],[[ECX]],4), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _cat01:
-; DARWIN-64-STATIC: movq _dst@GOTPCREL(%rip), %rax
-; DARWIN-64-STATIC-NEXT: leaq 64(%rax,%rdi,4), %rax
+; DARWIN-64-STATIC: movq _dst@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _cat01:
-; DARWIN-64-DYNAMIC: movq _dst@GOTPCREL(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: leaq 64(%rax,%rdi,4), %rax
+; DARWIN-64-DYNAMIC: movq _dst@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _cat01:
-; DARWIN-64-PIC: movq _dst@GOTPCREL(%rip), %rax
-; DARWIN-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax
+; DARWIN-64-PIC: movq _dst@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax
; DARWIN-64-PIC-NEXT: ret
}
@@ -7178,53 +7189,53 @@ entry:
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: cxt01:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: leal xdst+64(,%eax,4), %eax
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: leal xdst+64(,[[EAX]],4), %eax
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: cxt01:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: leal xdst+64(,%eax,4), %eax
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: leal xdst+64(,[[EAX]],4), %eax
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: cxt01:
-; LINUX-64-PIC: movq xdst@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax
+; LINUX-64-PIC: movq xdst@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _cxt01:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: leal _xdst+64(,%eax,4), %eax
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: leal _xdst+64(,[[EAX]],4), %eax
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _cxt01:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl L_xdst$non_lazy_ptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: leal 64(%ecx,%eax,4), %eax
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_xdst$non_lazy_ptr, [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: leal 64([[ECX]],[[EAX]],4), %eax
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _cxt01:
; DARWIN-32-PIC: calll L112$pb
; DARWIN-32-PIC-NEXT: L112$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L112$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: leal 64(%eax,%ecx,4), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L112$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal 64([[EAX]],[[ECX]],4), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _cxt01:
-; DARWIN-64-STATIC: movq _xdst@GOTPCREL(%rip), %rax
-; DARWIN-64-STATIC-NEXT: leaq 64(%rax,%rdi,4), %rax
+; DARWIN-64-STATIC: movq _xdst@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _cxt01:
-; DARWIN-64-DYNAMIC: movq _xdst@GOTPCREL(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: leaq 64(%rax,%rdi,4), %rax
+; DARWIN-64-DYNAMIC: movq _xdst@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _cxt01:
-; DARWIN-64-PIC: movq _xdst@GOTPCREL(%rip), %rax
-; DARWIN-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax
+; DARWIN-64-PIC: movq _xdst@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax
; DARWIN-64-PIC-NEXT: ret
}
@@ -7236,67 +7247,67 @@ entry:
%3 = bitcast i32* %2 to i8*
ret i8* %3
; LINUX-64-STATIC: cat02:
-; LINUX-64-STATIC: movq ptr(%rip), %rax
-; LINUX-64-STATIC: leaq 64(%rax,%rdi,4), %rax
+; LINUX-64-STATIC: movq ptr(%rip), [[RAX:%r.x]]
+; LINUX-64-STATIC: leaq 64([[RAX]],%rdi,4), %rax
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: cat02:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: movl ptr, %ecx
-; LINUX-32-STATIC-NEXT: leal 64(%ecx,%eax,4), %eax
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl ptr, [[ECX:%e.x]]
+; LINUX-32-STATIC-NEXT: leal 64([[ECX]],[[EAX]],4), %eax
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: cat02:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: movl ptr, %ecx
-; LINUX-32-PIC-NEXT: leal 64(%ecx,%eax,4), %eax
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl ptr, [[ECX:%e.x]]
+; LINUX-32-PIC-NEXT: leal 64([[ECX]],[[EAX]],4), %eax
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: cat02:
-; LINUX-64-PIC: movq ptr@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: movq (%rax), %rax
-; LINUX-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax
+; LINUX-64-PIC: movq ptr@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movq ([[RAX]]), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _cat02:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: movl _ptr, %ecx
-; DARWIN-32-STATIC-NEXT: leal 64(%ecx,%eax,4), %eax
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl _ptr, [[ECX:%e.x]]
+; DARWIN-32-STATIC-NEXT: leal 64([[ECX]],[[EAX]],4), %eax
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _cat02:
-; DARWIN-32-DYNAMIC: movl L_ptr$non_lazy_ptr, %eax
-; DARWIN-32-DYNAMIC-NEXT: movl (%eax), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-DYNAMIC-NEXT: leal 64(%eax,%ecx,4), %eax
+; DARWIN-32-DYNAMIC: movl L_ptr$non_lazy_ptr, [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl ([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: leal 64([[EAX]],[[ECX]],4), %eax
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _cat02:
; DARWIN-32-PIC: calll L113$pb
; DARWIN-32-PIC-NEXT: L113$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L113$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: movl (%eax), %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: leal 64(%eax,%ecx,4), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L113$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl ([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal 64([[EAX]],[[ECX]],4), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _cat02:
-; DARWIN-64-STATIC: movq _ptr@GOTPCREL(%rip), %rax
-; DARWIN-64-STATIC-NEXT: movq (%rax), %rax
-; DARWIN-64-STATIC-NEXT: leaq 64(%rax,%rdi,4), %rax
+; DARWIN-64-STATIC: movq _ptr@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movq ([[RAX]]), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _cat02:
-; DARWIN-64-DYNAMIC: movq _ptr@GOTPCREL(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: movq (%rax), %rax
-; DARWIN-64-DYNAMIC-NEXT: leaq 64(%rax,%rdi,4), %rax
+; DARWIN-64-DYNAMIC: movq _ptr@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq ([[RAX]]), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _cat02:
-; DARWIN-64-PIC: movq _ptr@GOTPCREL(%rip), %rax
-; DARWIN-64-PIC-NEXT: movq (%rax), %rax
-; DARWIN-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax
+; DARWIN-64-PIC: movq _ptr@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movq ([[RAX]]), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax
; DARWIN-64-PIC-NEXT: ret
}
@@ -7311,51 +7322,51 @@ entry:
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: cat03:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: leal dsrc+64(,%eax,4), %eax
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: leal dsrc+64(,[[EAX]],4), %eax
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: cat03:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: leal dsrc+64(,%eax,4), %eax
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: leal dsrc+64(,[[EAX]],4), %eax
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: cat03:
-; LINUX-64-PIC: movq dsrc@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax
+; LINUX-64-PIC: movq dsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _cat03:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: leal _dsrc+64(,%eax,4), %eax
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: leal _dsrc+64(,[[EAX]],4), %eax
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _cat03:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: leal _dsrc+64(,%eax,4), %eax
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: leal _dsrc+64(,[[EAX]],4), %eax
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _cat03:
; DARWIN-32-PIC: calll L114$pb
; DARWIN-32-PIC-NEXT: L114$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: leal (_dsrc-L114$pb)+64(%eax,%ecx,4), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal (_dsrc-L114$pb)+64([[EAX]],[[ECX]],4), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _cat03:
-; DARWIN-64-STATIC: leaq _dsrc(%rip), %rax
-; DARWIN-64-STATIC-NEXT: leaq 64(%rax,%rdi,4), %rax
+; DARWIN-64-STATIC: leaq _dsrc(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _cat03:
-; DARWIN-64-DYNAMIC: leaq _dsrc(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: leaq 64(%rax,%rdi,4), %rax
+; DARWIN-64-DYNAMIC: leaq _dsrc(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _cat03:
-; DARWIN-64-PIC: leaq _dsrc(%rip), %rax
-; DARWIN-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax
+; DARWIN-64-PIC: leaq _dsrc(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax
; DARWIN-64-PIC-NEXT: ret
}
@@ -7370,51 +7381,51 @@ entry:
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: cat04:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: leal ddst+64(,%eax,4), %eax
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: leal ddst+64(,[[EAX]],4), %eax
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: cat04:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: leal ddst+64(,%eax,4), %eax
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: leal ddst+64(,[[EAX]],4), %eax
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: cat04:
-; LINUX-64-PIC: movq ddst@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax
+; LINUX-64-PIC: movq ddst@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _cat04:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: leal _ddst+64(,%eax,4), %eax
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: leal _ddst+64(,[[EAX]],4), %eax
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _cat04:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: leal _ddst+64(,%eax,4), %eax
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: leal _ddst+64(,[[EAX]],4), %eax
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _cat04:
; DARWIN-32-PIC: calll L115$pb
; DARWIN-32-PIC-NEXT: L115$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: leal (_ddst-L115$pb)+64(%eax,%ecx,4), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal (_ddst-L115$pb)+64([[EAX]],[[ECX]],4), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _cat04:
-; DARWIN-64-STATIC: leaq _ddst(%rip), %rax
-; DARWIN-64-STATIC-NEXT: leaq 64(%rax,%rdi,4), %rax
+; DARWIN-64-STATIC: leaq _ddst(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _cat04:
-; DARWIN-64-DYNAMIC: leaq _ddst(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: leaq 64(%rax,%rdi,4), %rax
+; DARWIN-64-DYNAMIC: leaq _ddst(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _cat04:
-; DARWIN-64-PIC: leaq _ddst(%rip), %rax
-; DARWIN-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax
+; DARWIN-64-PIC: leaq _ddst(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax
; DARWIN-64-PIC-NEXT: ret
}
@@ -7426,62 +7437,62 @@ entry:
%3 = bitcast i32* %2 to i8*
ret i8* %3
; LINUX-64-STATIC: cat05:
-; LINUX-64-STATIC: movq dptr(%rip), %rax
-; LINUX-64-STATIC: leaq 64(%rax,%rdi,4), %rax
+; LINUX-64-STATIC: movq dptr(%rip), [[RAX:%r.x]]
+; LINUX-64-STATIC: leaq 64([[RAX]],%rdi,4), %rax
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: cat05:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: movl dptr, %ecx
-; LINUX-32-STATIC-NEXT: leal 64(%ecx,%eax,4), %eax
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl dptr, [[ECX:%e.x]]
+; LINUX-32-STATIC-NEXT: leal 64([[ECX]],[[EAX]],4), %eax
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: cat05:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: movl dptr, %ecx
-; LINUX-32-PIC-NEXT: leal 64(%ecx,%eax,4), %eax
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl dptr, [[ECX:%e.x]]
+; LINUX-32-PIC-NEXT: leal 64([[ECX]],[[EAX]],4), %eax
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: cat05:
-; LINUX-64-PIC: movq dptr@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: movq (%rax), %rax
-; LINUX-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax
+; LINUX-64-PIC: movq dptr@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movq ([[RAX]]), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _cat05:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: movl _dptr, %ecx
-; DARWIN-32-STATIC-NEXT: leal 64(%ecx,%eax,4), %eax
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl _dptr, [[ECX:%e.x]]
+; DARWIN-32-STATIC-NEXT: leal 64([[ECX]],[[EAX]],4), %eax
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _cat05:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl _dptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: leal 64(%ecx,%eax,4), %eax
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl _dptr, [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: leal 64([[ECX]],[[EAX]],4), %eax
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _cat05:
; DARWIN-32-PIC: calll L116$pb
; DARWIN-32-PIC-NEXT: L116$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: movl _dptr-L116$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: leal 64(%eax,%ecx,4), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl _dptr-L116$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal 64([[EAX]],[[ECX]],4), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _cat05:
-; DARWIN-64-STATIC: movq _dptr(%rip), %rax
-; DARWIN-64-STATIC-NEXT: leaq 64(%rax,%rdi,4), %rax
+; DARWIN-64-STATIC: movq _dptr(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _cat05:
-; DARWIN-64-DYNAMIC: movq _dptr(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: leaq 64(%rax,%rdi,4), %rax
+; DARWIN-64-DYNAMIC: movq _dptr(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _cat05:
-; DARWIN-64-PIC: movq _dptr(%rip), %rax
-; DARWIN-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax
+; DARWIN-64-PIC: movq _dptr(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax
; DARWIN-64-PIC-NEXT: ret
}
@@ -7496,51 +7507,51 @@ entry:
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: cat06:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: leal lsrc+64(,%eax,4), %eax
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: leal lsrc+64(,[[EAX]],4), %eax
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: cat06:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: leal lsrc+64(,%eax,4), %eax
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: leal lsrc+64(,[[EAX]],4), %eax
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: cat06:
-; LINUX-64-PIC: leaq lsrc(%rip), %rax
-; LINUX-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax
+; LINUX-64-PIC: leaq lsrc(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _cat06:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: leal _lsrc+64(,%eax,4), %eax
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: leal _lsrc+64(,[[EAX]],4), %eax
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _cat06:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: leal _lsrc+64(,%eax,4), %eax
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: leal _lsrc+64(,[[EAX]],4), %eax
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _cat06:
; DARWIN-32-PIC: calll L117$pb
; DARWIN-32-PIC-NEXT: L117$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: leal (_lsrc-L117$pb)+64(%eax,%ecx,4), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal (_lsrc-L117$pb)+64([[EAX]],[[ECX]],4), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _cat06:
-; DARWIN-64-STATIC: leaq _lsrc(%rip), %rax
-; DARWIN-64-STATIC-NEXT: leaq 64(%rax,%rdi,4), %rax
+; DARWIN-64-STATIC: leaq _lsrc(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _cat06:
-; DARWIN-64-DYNAMIC: leaq _lsrc(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: leaq 64(%rax,%rdi,4), %rax
+; DARWIN-64-DYNAMIC: leaq _lsrc(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _cat06:
-; DARWIN-64-PIC: leaq _lsrc(%rip), %rax
-; DARWIN-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax
+; DARWIN-64-PIC: leaq _lsrc(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax
; DARWIN-64-PIC-NEXT: ret
}
@@ -7555,51 +7566,51 @@ entry:
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: cat07:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: leal ldst+64(,%eax,4), %eax
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: leal ldst+64(,[[EAX]],4), %eax
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: cat07:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: leal ldst+64(,%eax,4), %eax
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: leal ldst+64(,[[EAX]],4), %eax
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: cat07:
-; LINUX-64-PIC: leaq ldst(%rip), %rax
-; LINUX-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax
+; LINUX-64-PIC: leaq ldst(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _cat07:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: leal _ldst+64(,%eax,4), %eax
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: leal _ldst+64(,[[EAX]],4), %eax
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _cat07:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: leal _ldst+64(,%eax,4), %eax
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: leal _ldst+64(,[[EAX]],4), %eax
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _cat07:
; DARWIN-32-PIC: calll L118$pb
; DARWIN-32-PIC-NEXT: L118$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: leal (_ldst-L118$pb)+64(%eax,%ecx,4), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal (_ldst-L118$pb)+64([[EAX]],[[ECX]],4), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _cat07:
-; DARWIN-64-STATIC: leaq _ldst(%rip), %rax
-; DARWIN-64-STATIC-NEXT: leaq 64(%rax,%rdi,4), %rax
+; DARWIN-64-STATIC: leaq _ldst(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _cat07:
-; DARWIN-64-DYNAMIC: leaq _ldst(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: leaq 64(%rax,%rdi,4), %rax
+; DARWIN-64-DYNAMIC: leaq _ldst(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _cat07:
-; DARWIN-64-PIC: leaq _ldst(%rip), %rax
-; DARWIN-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax
+; DARWIN-64-PIC: leaq _ldst(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax
; DARWIN-64-PIC-NEXT: ret
}
@@ -7611,61 +7622,61 @@ entry:
%3 = bitcast i32* %2 to i8*
ret i8* %3
; LINUX-64-STATIC: cat08:
-; LINUX-64-STATIC: movq lptr(%rip), %rax
-; LINUX-64-STATIC: leaq 64(%rax,%rdi,4), %rax
+; LINUX-64-STATIC: movq lptr(%rip), [[RAX:%r.x]]
+; LINUX-64-STATIC: leaq 64([[RAX]],%rdi,4), %rax
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: cat08:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: movl lptr, %ecx
-; LINUX-32-STATIC-NEXT: leal 64(%ecx,%eax,4), %eax
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl lptr, [[ECX:%e.x]]
+; LINUX-32-STATIC-NEXT: leal 64([[ECX]],[[EAX]],4), %eax
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: cat08:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: movl lptr, %ecx
-; LINUX-32-PIC-NEXT: leal 64(%ecx,%eax,4), %eax
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl lptr, [[ECX:%e.x]]
+; LINUX-32-PIC-NEXT: leal 64([[ECX]],[[EAX]],4), %eax
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: cat08:
-; LINUX-64-PIC: movq lptr(%rip), %rax
-; LINUX-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax
+; LINUX-64-PIC: movq lptr(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _cat08:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: movl _lptr, %ecx
-; DARWIN-32-STATIC-NEXT: leal 64(%ecx,%eax,4), %eax
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl _lptr, [[ECX:%e.x]]
+; DARWIN-32-STATIC-NEXT: leal 64([[ECX]],[[EAX]],4), %eax
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _cat08:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl _lptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: leal 64(%ecx,%eax,4), %eax
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl _lptr, [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: leal 64([[ECX]],[[EAX]],4), %eax
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _cat08:
; DARWIN-32-PIC: calll L119$pb
; DARWIN-32-PIC-NEXT: L119$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: movl _lptr-L119$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: leal 64(%eax,%ecx,4), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl _lptr-L119$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal 64([[EAX]],[[ECX]],4), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _cat08:
-; DARWIN-64-STATIC: movq _lptr(%rip), %rax
-; DARWIN-64-STATIC-NEXT: leaq 64(%rax,%rdi,4), %rax
+; DARWIN-64-STATIC: movq _lptr(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _cat08:
-; DARWIN-64-DYNAMIC: movq _lptr(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: leaq 64(%rax,%rdi,4), %rax
+; DARWIN-64-DYNAMIC: movq _lptr(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _cat08:
-; DARWIN-64-PIC: movq _lptr(%rip), %rax
-; DARWIN-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax
+; DARWIN-64-PIC: movq _lptr(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax
; DARWIN-64-PIC-NEXT: ret
}
@@ -7680,53 +7691,53 @@ entry:
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: cam00:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: leal src+262144(,%eax,4), %eax
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: leal src+262144(,[[EAX]],4), %eax
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: cam00:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: leal src+262144(,%eax,4), %eax
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: leal src+262144(,[[EAX]],4), %eax
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: cam00:
-; LINUX-64-PIC: movq src@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
+; LINUX-64-PIC: movq src@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _cam00:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: leal _src+262144(,%eax,4), %eax
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: leal _src+262144(,[[EAX]],4), %eax
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _cam00:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl L_src$non_lazy_ptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: leal 262144(%ecx,%eax,4), %eax
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_src$non_lazy_ptr, [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: leal 262144([[ECX]],[[EAX]],4), %eax
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _cam00:
; DARWIN-32-PIC: calll L120$pb
; DARWIN-32-PIC-NEXT: L120$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L120$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: leal 262144(%eax,%ecx,4), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L120$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal 262144([[EAX]],[[ECX]],4), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _cam00:
-; DARWIN-64-STATIC: movq _src@GOTPCREL(%rip), %rax
-; DARWIN-64-STATIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
+; DARWIN-64-STATIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _cam00:
-; DARWIN-64-DYNAMIC: movq _src@GOTPCREL(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
+; DARWIN-64-DYNAMIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _cam00:
-; DARWIN-64-PIC: movq _src@GOTPCREL(%rip), %rax
-; DARWIN-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
+; DARWIN-64-PIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax
; DARWIN-64-PIC-NEXT: ret
}
@@ -7741,53 +7752,53 @@ entry:
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: cxm00:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: leal xsrc+262144(,%eax,4), %eax
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: leal xsrc+262144(,[[EAX]],4), %eax
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: cxm00:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: leal xsrc+262144(,%eax,4), %eax
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: leal xsrc+262144(,[[EAX]],4), %eax
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: cxm00:
-; LINUX-64-PIC: movq xsrc@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
+; LINUX-64-PIC: movq xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _cxm00:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: leal _xsrc+262144(,%eax,4), %eax
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: leal _xsrc+262144(,[[EAX]],4), %eax
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _cxm00:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl L_xsrc$non_lazy_ptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: leal 262144(%ecx,%eax,4), %eax
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_xsrc$non_lazy_ptr, [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: leal 262144([[ECX]],[[EAX]],4), %eax
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _cxm00:
; DARWIN-32-PIC: calll L121$pb
; DARWIN-32-PIC-NEXT: L121$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L121$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: leal 262144(%eax,%ecx,4), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L121$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal 262144([[EAX]],[[ECX]],4), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _cxm00:
-; DARWIN-64-STATIC: movq _xsrc@GOTPCREL(%rip), %rax
-; DARWIN-64-STATIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
+; DARWIN-64-STATIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _cxm00:
-; DARWIN-64-DYNAMIC: movq _xsrc@GOTPCREL(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
+; DARWIN-64-DYNAMIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _cxm00:
-; DARWIN-64-PIC: movq _xsrc@GOTPCREL(%rip), %rax
-; DARWIN-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
+; DARWIN-64-PIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax
; DARWIN-64-PIC-NEXT: ret
}
@@ -7802,53 +7813,53 @@ entry:
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: cam01:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: leal dst+262144(,%eax,4), %eax
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: leal dst+262144(,[[EAX]],4), %eax
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: cam01:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: leal dst+262144(,%eax,4), %eax
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: leal dst+262144(,[[EAX]],4), %eax
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: cam01:
-; LINUX-64-PIC: movq dst@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
+; LINUX-64-PIC: movq dst@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _cam01:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: leal _dst+262144(,%eax,4), %eax
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: leal _dst+262144(,[[EAX]],4), %eax
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _cam01:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl L_dst$non_lazy_ptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: leal 262144(%ecx,%eax,4), %eax
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_dst$non_lazy_ptr, [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: leal 262144([[ECX]],[[EAX]],4), %eax
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _cam01:
; DARWIN-32-PIC: calll L122$pb
; DARWIN-32-PIC-NEXT: L122$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L122$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: leal 262144(%eax,%ecx,4), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L122$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal 262144([[EAX]],[[ECX]],4), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _cam01:
-; DARWIN-64-STATIC: movq _dst@GOTPCREL(%rip), %rax
-; DARWIN-64-STATIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
+; DARWIN-64-STATIC: movq _dst@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _cam01:
-; DARWIN-64-DYNAMIC: movq _dst@GOTPCREL(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
+; DARWIN-64-DYNAMIC: movq _dst@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _cam01:
-; DARWIN-64-PIC: movq _dst@GOTPCREL(%rip), %rax
-; DARWIN-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
+; DARWIN-64-PIC: movq _dst@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax
; DARWIN-64-PIC-NEXT: ret
}
@@ -7864,52 +7875,52 @@ entry:
; LINUX-32-STATIC: cxm01:
; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: leal xdst+262144(,%eax,4), %eax
+; LINUX-32-STATIC-NEXT: leal xdst+262144(,[[EAX]],4), %eax
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: cxm01:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: leal xdst+262144(,%eax,4), %eax
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: leal xdst+262144(,[[EAX]],4), %eax
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: cxm01:
-; LINUX-64-PIC: movq xdst@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
+; LINUX-64-PIC: movq xdst@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _cxm01:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: leal _xdst+262144(,%eax,4), %eax
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: leal _xdst+262144(,[[EAX]],4), %eax
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _cxm01:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl L_xdst$non_lazy_ptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: leal 262144(%ecx,%eax,4), %eax
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl L_xdst$non_lazy_ptr, [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: leal 262144([[ECX]],[[EAX]],4), %eax
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _cxm01:
; DARWIN-32-PIC: calll L123$pb
; DARWIN-32-PIC-NEXT: L123$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L123$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: leal 262144(%eax,%ecx,4), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L123$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal 262144([[EAX]],[[ECX]],4), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _cxm01:
-; DARWIN-64-STATIC: movq _xdst@GOTPCREL(%rip), %rax
-; DARWIN-64-STATIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
+; DARWIN-64-STATIC: movq _xdst@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _cxm01:
-; DARWIN-64-DYNAMIC: movq _xdst@GOTPCREL(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
+; DARWIN-64-DYNAMIC: movq _xdst@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _cxm01:
-; DARWIN-64-PIC: movq _xdst@GOTPCREL(%rip), %rax
-; DARWIN-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
+; DARWIN-64-PIC: movq _xdst@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax
; DARWIN-64-PIC-NEXT: ret
}
@@ -7921,67 +7932,67 @@ entry:
%3 = bitcast i32* %2 to i8*
ret i8* %3
; LINUX-64-STATIC: cam02:
-; LINUX-64-STATIC: movq ptr(%rip), %rax
-; LINUX-64-STATIC: leaq 262144(%rax,%rdi,4), %rax
+; LINUX-64-STATIC: movq ptr(%rip), [[RAX:%r.x]]
+; LINUX-64-STATIC: leaq 262144([[RAX]],%rdi,4), %rax
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: cam02:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: movl ptr, %ecx
-; LINUX-32-STATIC-NEXT: leal 262144(%ecx,%eax,4), %eax
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl ptr, [[ECX:%e.x]]
+; LINUX-32-STATIC-NEXT: leal 262144([[ECX]],[[EAX]],4), %eax
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: cam02:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: movl ptr, %ecx
-; LINUX-32-PIC-NEXT: leal 262144(%ecx,%eax,4), %eax
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl ptr, [[ECX:%e.x]]
+; LINUX-32-PIC-NEXT: leal 262144([[ECX]],[[EAX]],4), %eax
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: cam02:
-; LINUX-64-PIC: movq ptr@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: movq (%rax), %rax
-; LINUX-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
+; LINUX-64-PIC: movq ptr@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movq ([[RAX]]), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _cam02:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: movl _ptr, %ecx
-; DARWIN-32-STATIC-NEXT: leal 262144(%ecx,%eax,4), %eax
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl _ptr, [[ECX:%e.x]]
+; DARWIN-32-STATIC-NEXT: leal 262144([[ECX]],[[EAX]],4), %eax
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _cam02:
-; DARWIN-32-DYNAMIC: movl L_ptr$non_lazy_ptr, %eax
-; DARWIN-32-DYNAMIC-NEXT: movl (%eax), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-DYNAMIC-NEXT: leal 262144(%eax,%ecx,4), %eax
+; DARWIN-32-DYNAMIC: movl L_ptr$non_lazy_ptr, [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl ([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: leal 262144([[EAX]],[[ECX]],4), %eax
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _cam02:
; DARWIN-32-PIC: calll L124$pb
; DARWIN-32-PIC-NEXT: L124$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L124$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: movl (%eax), %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: leal 262144(%eax,%ecx,4), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L124$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl ([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal 262144([[EAX]],[[ECX]],4), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _cam02:
-; DARWIN-64-STATIC: movq _ptr@GOTPCREL(%rip), %rax
-; DARWIN-64-STATIC-NEXT: movq (%rax), %rax
-; DARWIN-64-STATIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
+; DARWIN-64-STATIC: movq _ptr@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movq ([[RAX]]), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _cam02:
-; DARWIN-64-DYNAMIC: movq _ptr@GOTPCREL(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: movq (%rax), %rax
-; DARWIN-64-DYNAMIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
+; DARWIN-64-DYNAMIC: movq _ptr@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq ([[RAX]]), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _cam02:
-; DARWIN-64-PIC: movq _ptr@GOTPCREL(%rip), %rax
-; DARWIN-64-PIC-NEXT: movq (%rax), %rax
-; DARWIN-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
+; DARWIN-64-PIC: movq _ptr@GOTPCREL(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: movq ([[RAX]]), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax
; DARWIN-64-PIC-NEXT: ret
}
@@ -7996,51 +8007,51 @@ entry:
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: cam03:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: leal dsrc+262144(,%eax,4), %eax
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: leal dsrc+262144(,[[EAX]],4), %eax
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: cam03:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: leal dsrc+262144(,%eax,4), %eax
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: leal dsrc+262144(,[[EAX]],4), %eax
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: cam03:
-; LINUX-64-PIC: movq dsrc@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
+; LINUX-64-PIC: movq dsrc@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _cam03:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: leal _dsrc+262144(,%eax,4), %eax
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: leal _dsrc+262144(,[[EAX]],4), %eax
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _cam03:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: leal _dsrc+262144(,%eax,4), %eax
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: leal _dsrc+262144(,[[EAX]],4), %eax
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _cam03:
; DARWIN-32-PIC: calll L125$pb
; DARWIN-32-PIC-NEXT: L125$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: leal (_dsrc-L125$pb)+262144(%eax,%ecx,4), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal (_dsrc-L125$pb)+262144([[EAX]],[[ECX]],4), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _cam03:
-; DARWIN-64-STATIC: leaq _dsrc(%rip), %rax
-; DARWIN-64-STATIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
+; DARWIN-64-STATIC: leaq _dsrc(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _cam03:
-; DARWIN-64-DYNAMIC: leaq _dsrc(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
+; DARWIN-64-DYNAMIC: leaq _dsrc(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _cam03:
-; DARWIN-64-PIC: leaq _dsrc(%rip), %rax
-; DARWIN-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
+; DARWIN-64-PIC: leaq _dsrc(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax
; DARWIN-64-PIC-NEXT: ret
}
@@ -8055,51 +8066,51 @@ entry:
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: cam04:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: leal ddst+262144(,%eax,4), %eax
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: leal ddst+262144(,[[EAX]],4), %eax
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: cam04:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: leal ddst+262144(,%eax,4), %eax
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: leal ddst+262144(,[[EAX]],4), %eax
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: cam04:
-; LINUX-64-PIC: movq ddst@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
+; LINUX-64-PIC: movq ddst@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _cam04:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: leal _ddst+262144(,%eax,4), %eax
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: leal _ddst+262144(,[[EAX]],4), %eax
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _cam04:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: leal _ddst+262144(,%eax,4), %eax
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: leal _ddst+262144(,[[EAX]],4), %eax
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _cam04:
; DARWIN-32-PIC: calll L126$pb
; DARWIN-32-PIC-NEXT: L126$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: leal (_ddst-L126$pb)+262144(%eax,%ecx,4), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal (_ddst-L126$pb)+262144([[EAX]],[[ECX]],4), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _cam04:
-; DARWIN-64-STATIC: leaq _ddst(%rip), %rax
-; DARWIN-64-STATIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
+; DARWIN-64-STATIC: leaq _ddst(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _cam04:
-; DARWIN-64-DYNAMIC: leaq _ddst(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
+; DARWIN-64-DYNAMIC: leaq _ddst(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _cam04:
-; DARWIN-64-PIC: leaq _ddst(%rip), %rax
-; DARWIN-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
+; DARWIN-64-PIC: leaq _ddst(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax
; DARWIN-64-PIC-NEXT: ret
}
@@ -8111,62 +8122,62 @@ entry:
%3 = bitcast i32* %2 to i8*
ret i8* %3
; LINUX-64-STATIC: cam05:
-; LINUX-64-STATIC: movq dptr(%rip), %rax
-; LINUX-64-STATIC: leaq 262144(%rax,%rdi,4), %rax
+; LINUX-64-STATIC: movq dptr(%rip), [[RAX:%r.x]]
+; LINUX-64-STATIC: leaq 262144([[RAX]],%rdi,4), %rax
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: cam05:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: movl dptr, %ecx
-; LINUX-32-STATIC-NEXT: leal 262144(%ecx,%eax,4), %eax
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl dptr, [[ECX:%e.x]]
+; LINUX-32-STATIC-NEXT: leal 262144([[ECX]],[[EAX]],4), %eax
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: cam05:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: movl dptr, %ecx
-; LINUX-32-PIC-NEXT: leal 262144(%ecx,%eax,4), %eax
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl dptr, [[ECX:%e.x]]
+; LINUX-32-PIC-NEXT: leal 262144([[ECX]],[[EAX]],4), %eax
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: cam05:
-; LINUX-64-PIC: movq dptr@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: movq (%rax), %rax
-; LINUX-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
+; LINUX-64-PIC: movq dptr@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: movq ([[RAX]]), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _cam05:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: movl _dptr, %ecx
-; DARWIN-32-STATIC-NEXT: leal 262144(%ecx,%eax,4), %eax
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl _dptr, [[ECX:%e.x]]
+; DARWIN-32-STATIC-NEXT: leal 262144([[ECX]],[[EAX]],4), %eax
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _cam05:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl _dptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: leal 262144(%ecx,%eax,4), %eax
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl _dptr, [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: leal 262144([[ECX]],[[EAX]],4), %eax
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _cam05:
; DARWIN-32-PIC: calll L127$pb
; DARWIN-32-PIC-NEXT: L127$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: movl _dptr-L127$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: leal 262144(%eax,%ecx,4), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl _dptr-L127$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal 262144([[EAX]],[[ECX]],4), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _cam05:
-; DARWIN-64-STATIC: movq _dptr(%rip), %rax
-; DARWIN-64-STATIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
+; DARWIN-64-STATIC: movq _dptr(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _cam05:
-; DARWIN-64-DYNAMIC: movq _dptr(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
+; DARWIN-64-DYNAMIC: movq _dptr(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _cam05:
-; DARWIN-64-PIC: movq _dptr(%rip), %rax
-; DARWIN-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
+; DARWIN-64-PIC: movq _dptr(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax
; DARWIN-64-PIC-NEXT: ret
}
@@ -8181,51 +8192,51 @@ entry:
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: cam06:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: leal lsrc+262144(,%eax,4), %eax
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: leal lsrc+262144(,[[EAX]],4), %eax
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: cam06:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: leal lsrc+262144(,%eax,4), %eax
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: leal lsrc+262144(,[[EAX]],4), %eax
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: cam06:
-; LINUX-64-PIC: leaq lsrc(%rip), %rax
-; LINUX-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
+; LINUX-64-PIC: leaq lsrc(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _cam06:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: leal _lsrc+262144(,%eax,4), %eax
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: leal _lsrc+262144(,[[EAX]],4), %eax
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _cam06:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: leal _lsrc+262144(,%eax,4), %eax
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: leal _lsrc+262144(,[[EAX]],4), %eax
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _cam06:
; DARWIN-32-PIC: calll L128$pb
; DARWIN-32-PIC-NEXT: L128$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: leal (_lsrc-L128$pb)+262144(%eax,%ecx,4), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal (_lsrc-L128$pb)+262144([[EAX]],[[ECX]],4), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _cam06:
-; DARWIN-64-STATIC: leaq _lsrc(%rip), %rax
-; DARWIN-64-STATIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
+; DARWIN-64-STATIC: leaq _lsrc(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _cam06:
-; DARWIN-64-DYNAMIC: leaq _lsrc(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
+; DARWIN-64-DYNAMIC: leaq _lsrc(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _cam06:
-; DARWIN-64-PIC: leaq _lsrc(%rip), %rax
-; DARWIN-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
+; DARWIN-64-PIC: leaq _lsrc(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax
; DARWIN-64-PIC-NEXT: ret
}
@@ -8240,51 +8251,51 @@ entry:
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: cam07:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: leal ldst+262144(,%eax,4), %eax
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: leal ldst+262144(,[[EAX]],4), %eax
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: cam07:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: leal ldst+262144(,%eax,4), %eax
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: leal ldst+262144(,[[EAX]],4), %eax
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: cam07:
-; LINUX-64-PIC: leaq ldst(%rip), %rax
-; LINUX-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
+; LINUX-64-PIC: leaq ldst(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _cam07:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: leal _ldst+262144(,%eax,4), %eax
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: leal _ldst+262144(,[[EAX]],4), %eax
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _cam07:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: leal _ldst+262144(,%eax,4), %eax
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: leal _ldst+262144(,[[EAX]],4), %eax
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _cam07:
; DARWIN-32-PIC: calll L129$pb
; DARWIN-32-PIC-NEXT: L129$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: leal (_ldst-L129$pb)+262144(%eax,%ecx,4), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal (_ldst-L129$pb)+262144([[EAX]],[[ECX]],4), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _cam07:
-; DARWIN-64-STATIC: leaq _ldst(%rip), %rax
-; DARWIN-64-STATIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
+; DARWIN-64-STATIC: leaq _ldst(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _cam07:
-; DARWIN-64-DYNAMIC: leaq _ldst(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
+; DARWIN-64-DYNAMIC: leaq _ldst(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _cam07:
-; DARWIN-64-PIC: leaq _ldst(%rip), %rax
-; DARWIN-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
+; DARWIN-64-PIC: leaq _ldst(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax
; DARWIN-64-PIC-NEXT: ret
}
@@ -8296,61 +8307,61 @@ entry:
%3 = bitcast i32* %2 to i8*
ret i8* %3
; LINUX-64-STATIC: cam08:
-; LINUX-64-STATIC: movq lptr(%rip), %rax
-; LINUX-64-STATIC: leaq 262144(%rax,%rdi,4), %rax
+; LINUX-64-STATIC: movq lptr(%rip), [[RAX:%r.x]]
+; LINUX-64-STATIC: leaq 262144([[RAX]],%rdi,4), %rax
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: cam08:
-; LINUX-32-STATIC: movl 4(%esp), %eax
-; LINUX-32-STATIC-NEXT: movl lptr, %ecx
-; LINUX-32-STATIC-NEXT: leal 262144(%ecx,%eax,4), %eax
+; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-STATIC-NEXT: movl lptr, [[ECX:%e.x]]
+; LINUX-32-STATIC-NEXT: leal 262144([[ECX]],[[EAX]],4), %eax
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: cam08:
-; LINUX-32-PIC: movl 4(%esp), %eax
-; LINUX-32-PIC-NEXT: movl lptr, %ecx
-; LINUX-32-PIC-NEXT: leal 262144(%ecx,%eax,4), %eax
+; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
+; LINUX-32-PIC-NEXT: movl lptr, [[ECX:%e.x]]
+; LINUX-32-PIC-NEXT: leal 262144([[ECX]],[[EAX]],4), %eax
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: cam08:
-; LINUX-64-PIC: movq lptr(%rip), %rax
-; LINUX-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
+; LINUX-64-PIC: movq lptr(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _cam08:
-; DARWIN-32-STATIC: movl 4(%esp), %eax
-; DARWIN-32-STATIC-NEXT: movl _lptr, %ecx
-; DARWIN-32-STATIC-NEXT: leal 262144(%ecx,%eax,4), %eax
+; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-STATIC-NEXT: movl _lptr, [[ECX:%e.x]]
+; DARWIN-32-STATIC-NEXT: leal 262144([[ECX]],[[EAX]],4), %eax
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _cam08:
-; DARWIN-32-DYNAMIC: movl 4(%esp), %eax
-; DARWIN-32-DYNAMIC-NEXT: movl _lptr, %ecx
-; DARWIN-32-DYNAMIC-NEXT: leal 262144(%ecx,%eax,4), %eax
+; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: movl _lptr, [[ECX:%e.x]]
+; DARWIN-32-DYNAMIC-NEXT: leal 262144([[ECX]],[[EAX]],4), %eax
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _cam08:
; DARWIN-32-PIC: calll L130$pb
; DARWIN-32-PIC-NEXT: L130$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx
-; DARWIN-32-PIC-NEXT: movl _lptr-L130$pb(%eax), %eax
-; DARWIN-32-PIC-NEXT: leal 262144(%eax,%ecx,4), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl _lptr-L130$pb([[EAX]]), [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal 262144([[EAX]],[[ECX]],4), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _cam08:
-; DARWIN-64-STATIC: movq _lptr(%rip), %rax
-; DARWIN-64-STATIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
+; DARWIN-64-STATIC: movq _lptr(%rip), [[RAX:%r.x]]
+; DARWIN-64-STATIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _cam08:
-; DARWIN-64-DYNAMIC: movq _lptr(%rip), %rax
-; DARWIN-64-DYNAMIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
+; DARWIN-64-DYNAMIC: movq _lptr(%rip), [[RAX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _cam08:
-; DARWIN-64-PIC: movq _lptr(%rip), %rax
-; DARWIN-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax
+; DARWIN-64-PIC: movq _lptr(%rip), [[RAX:%r.x]]
+; DARWIN-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax
; DARWIN-64-PIC-NEXT: ret
}
@@ -8648,8 +8659,8 @@ entry:
; DARWIN-32-PIC: _address:
; DARWIN-32-PIC: calll L133$pb
; DARWIN-32-PIC-NEXT: L133$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl L_callee$non_lazy_ptr-L133$pb(%eax), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_callee$non_lazy_ptr-L133$pb([[EAX]]), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _address:
@@ -8697,8 +8708,8 @@ entry:
; DARWIN-32-PIC: _laddress:
; DARWIN-32-PIC: calll L134$pb
; DARWIN-32-PIC-NEXT: L134$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: leal _lcallee-L134$pb(%eax), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal _lcallee-L134$pb([[EAX]]), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _laddress:
@@ -8744,8 +8755,8 @@ entry:
; DARWIN-32-PIC: _daddress:
; DARWIN-32-PIC: calll L135$pb
; DARWIN-32-PIC-NEXT: L135$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: leal _dcallee-L135$pb(%eax), %eax
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: leal _dcallee-L135$pb([[EAX]]), %eax
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _daddress:
@@ -9206,11 +9217,11 @@ entry:
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: icaller:
-; LINUX-64-PIC: pushq %rbx
-; LINUX-64-PIC-NEXT: movq ifunc@GOTPCREL(%rip), %rbx
-; LINUX-64-PIC-NEXT: callq *(%rbx)
-; LINUX-64-PIC-NEXT: callq *(%rbx)
-; LINUX-64-PIC-NEXT: popq %rbx
+; LINUX-64-PIC: pushq [[RBX:%r.x]]
+; LINUX-64-PIC-NEXT: movq ifunc@GOTPCREL(%rip), [[RBX:%r.x]]
+; LINUX-64-PIC-NEXT: callq *([[RBX]])
+; LINUX-64-PIC-NEXT: callq *([[RBX]])
+; LINUX-64-PIC-NEXT: popq [[RBX:%r.x]]
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _icaller:
@@ -9235,8 +9246,8 @@ entry:
; DARWIN-32-PIC-NEXT: subl $8, %esp
; DARWIN-32-PIC-NEXT: calll L142$pb
; DARWIN-32-PIC-NEXT: L142$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl L_ifunc$non_lazy_ptr-L142$pb(%eax), %esi
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_ifunc$non_lazy_ptr-L142$pb([[EAX]]), %esi
; DARWIN-32-PIC-NEXT: calll *(%esi)
; DARWIN-32-PIC-NEXT: calll *(%esi)
; DARWIN-32-PIC-NEXT: addl $8, %esp
@@ -9244,27 +9255,27 @@ entry:
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _icaller:
-; DARWIN-64-STATIC: pushq %rbx
-; DARWIN-64-STATIC-NEXT: movq _ifunc@GOTPCREL(%rip), %rbx
-; DARWIN-64-STATIC-NEXT: callq *(%rbx)
-; DARWIN-64-STATIC-NEXT: callq *(%rbx)
-; DARWIN-64-STATIC-NEXT: popq %rbx
+; DARWIN-64-STATIC: pushq [[RBX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movq _ifunc@GOTPCREL(%rip), [[RBX:%r.x]]
+; DARWIN-64-STATIC-NEXT: callq *([[RBX]])
+; DARWIN-64-STATIC-NEXT: callq *([[RBX]])
+; DARWIN-64-STATIC-NEXT: popq [[RBX:%r.x]]
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _icaller:
-; DARWIN-64-DYNAMIC: pushq %rbx
-; DARWIN-64-DYNAMIC-NEXT: movq _ifunc@GOTPCREL(%rip), %rbx
-; DARWIN-64-DYNAMIC-NEXT: callq *(%rbx)
-; DARWIN-64-DYNAMIC-NEXT: callq *(%rbx)
-; DARWIN-64-DYNAMIC-NEXT: popq %rbx
+; DARWIN-64-DYNAMIC: pushq [[RBX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq _ifunc@GOTPCREL(%rip), [[RBX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: callq *([[RBX]])
+; DARWIN-64-DYNAMIC-NEXT: callq *([[RBX]])
+; DARWIN-64-DYNAMIC-NEXT: popq [[RBX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _icaller:
-; DARWIN-64-PIC: pushq %rbx
-; DARWIN-64-PIC-NEXT: movq _ifunc@GOTPCREL(%rip), %rbx
-; DARWIN-64-PIC-NEXT: callq *(%rbx)
-; DARWIN-64-PIC-NEXT: callq *(%rbx)
-; DARWIN-64-PIC-NEXT: popq %rbx
+; DARWIN-64-PIC: pushq [[RBX:%r.x]]
+; DARWIN-64-PIC-NEXT: movq _ifunc@GOTPCREL(%rip), [[RBX:%r.x]]
+; DARWIN-64-PIC-NEXT: callq *([[RBX]])
+; DARWIN-64-PIC-NEXT: callq *([[RBX]])
+; DARWIN-64-PIC-NEXT: popq [[RBX:%r.x]]
; DARWIN-64-PIC-NEXT: ret
}
@@ -9296,11 +9307,11 @@ entry:
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: dicaller:
-; LINUX-64-PIC: pushq %rbx
-; LINUX-64-PIC-NEXT: movq difunc@GOTPCREL(%rip), %rbx
-; LINUX-64-PIC-NEXT: callq *(%rbx)
-; LINUX-64-PIC-NEXT: callq *(%rbx)
-; LINUX-64-PIC-NEXT: popq %rbx
+; LINUX-64-PIC: pushq [[RBX:%r.x]]
+; LINUX-64-PIC-NEXT: movq difunc@GOTPCREL(%rip), [[RBX:%r.x]]
+; LINUX-64-PIC-NEXT: callq *([[RBX]])
+; LINUX-64-PIC-NEXT: callq *([[RBX]])
+; LINUX-64-PIC-NEXT: popq [[RBX:%r.x]]
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _dicaller:
@@ -9461,11 +9472,11 @@ entry:
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: itailcaller:
-; LINUX-64-PIC: pushq %rbx
-; LINUX-64-PIC-NEXT: movq ifunc@GOTPCREL(%rip), %rbx
-; LINUX-64-PIC-NEXT: callq *(%rbx)
-; LINUX-64-PIC-NEXT: callq *(%rbx)
-; LINUX-64-PIC-NEXT: popq %rbx
+; LINUX-64-PIC: pushq [[RBX:%r.x]]
+; LINUX-64-PIC-NEXT: movq ifunc@GOTPCREL(%rip), [[RBX:%r.x]]
+; LINUX-64-PIC-NEXT: callq *([[RBX]])
+; LINUX-64-PIC-NEXT: callq *([[RBX]])
+; LINUX-64-PIC-NEXT: popq [[RBX:%r.x]]
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _itailcaller:
@@ -9490,8 +9501,8 @@ entry:
; DARWIN-32-PIC-NEXT: subl $8, %esp
; DARWIN-32-PIC-NEXT: calll L145$pb
; DARWIN-32-PIC-NEXT: L145$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: movl L_ifunc$non_lazy_ptr-L145$pb(%eax), %esi
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: movl L_ifunc$non_lazy_ptr-L145$pb([[EAX]]), %esi
; DARWIN-32-PIC-NEXT: calll *(%esi)
; DARWIN-32-PIC-NEXT: calll *(%esi)
; DARWIN-32-PIC-NEXT: addl $8, %esp
@@ -9499,27 +9510,27 @@ entry:
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _itailcaller:
-; DARWIN-64-STATIC: pushq %rbx
-; DARWIN-64-STATIC-NEXT: movq _ifunc@GOTPCREL(%rip), %rbx
-; DARWIN-64-STATIC-NEXT: callq *(%rbx)
-; DARWIN-64-STATIC-NEXT: callq *(%rbx)
-; DARWIN-64-STATIC-NEXT: popq %rbx
+; DARWIN-64-STATIC: pushq [[RBX:%r.x]]
+; DARWIN-64-STATIC-NEXT: movq _ifunc@GOTPCREL(%rip), [[RBX:%r.x]]
+; DARWIN-64-STATIC-NEXT: callq *([[RBX]])
+; DARWIN-64-STATIC-NEXT: callq *([[RBX]])
+; DARWIN-64-STATIC-NEXT: popq [[RBX:%r.x]]
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _itailcaller:
-; DARWIN-64-DYNAMIC: pushq %rbx
-; DARWIN-64-DYNAMIC-NEXT: movq _ifunc@GOTPCREL(%rip), %rbx
-; DARWIN-64-DYNAMIC-NEXT: callq *(%rbx)
-; DARWIN-64-DYNAMIC-NEXT: callq *(%rbx)
-; DARWIN-64-DYNAMIC-NEXT: popq %rbx
+; DARWIN-64-DYNAMIC: pushq [[RBX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: movq _ifunc@GOTPCREL(%rip), [[RBX:%r.x]]
+; DARWIN-64-DYNAMIC-NEXT: callq *([[RBX]])
+; DARWIN-64-DYNAMIC-NEXT: callq *([[RBX]])
+; DARWIN-64-DYNAMIC-NEXT: popq [[RBX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _itailcaller:
-; DARWIN-64-PIC: pushq %rbx
-; DARWIN-64-PIC-NEXT: movq _ifunc@GOTPCREL(%rip), %rbx
-; DARWIN-64-PIC-NEXT: callq *(%rbx)
-; DARWIN-64-PIC-NEXT: callq *(%rbx)
-; DARWIN-64-PIC-NEXT: popq %rbx
+; DARWIN-64-PIC: pushq [[RBX:%r.x]]
+; DARWIN-64-PIC-NEXT: movq _ifunc@GOTPCREL(%rip), [[RBX:%r.x]]
+; DARWIN-64-PIC-NEXT: callq *([[RBX]])
+; DARWIN-64-PIC-NEXT: callq *([[RBX]])
+; DARWIN-64-PIC-NEXT: popq [[RBX:%r.x]]
; DARWIN-64-PIC-NEXT: ret
}
@@ -9547,8 +9558,8 @@ entry:
; LINUX-64-PIC: ditailcaller:
; LINUX-64-PIC: pushq
-; LINUX-64-PIC-NEXT: movq difunc@GOTPCREL(%rip), %rax
-; LINUX-64-PIC-NEXT: callq *(%rax)
+; LINUX-64-PIC-NEXT: movq difunc@GOTPCREL(%rip), [[RAX:%r.x]]
+; LINUX-64-PIC-NEXT: callq *([[RAX]])
; LINUX-64-PIC-NEXT: popq
; LINUX-64-PIC-NEXT: ret
@@ -9568,8 +9579,8 @@ entry:
; DARWIN-32-PIC: subl $12, %esp
; DARWIN-32-PIC-NEXT: calll L146$pb
; DARWIN-32-PIC-NEXT: L146$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: calll *_difunc-L146$pb(%eax)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: calll *_difunc-L146$pb([[EAX]])
; DARWIN-32-PIC-NEXT: addl $12, %esp
; DARWIN-32-PIC-NEXT: ret
@@ -9635,8 +9646,8 @@ entry:
; DARWIN-32-PIC: subl $12, %esp
; DARWIN-32-PIC-NEXT: calll L147$pb
; DARWIN-32-PIC-NEXT: L147$pb:
-; DARWIN-32-PIC-NEXT: popl %eax
-; DARWIN-32-PIC-NEXT: calll *_lifunc-L147$pb(%eax)
+; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
+; DARWIN-32-PIC-NEXT: calll *_lifunc-L147$pb([[EAX]])
; DARWIN-32-PIC-NEXT: addl $12, %esp
; DARWIN-32-PIC-NEXT: ret
diff --git a/test/CodeGen/X86/add.ll b/test/CodeGen/X86/add.ll
index 62c898025c80..b95e5b53c2dc 100644
--- a/test/CodeGen/X86/add.ll
+++ b/test/CodeGen/X86/add.ll
@@ -133,3 +133,18 @@ define i32 @test9(i32 %x, i32 %y) nounwind readnone {
; X64: subl
; X64: ret
}
+
+define i1 @test10(i32 %x) nounwind {
+entry:
+ %t = call {i32, i1} @llvm.sadd.with.overflow.i32(i32 %x, i32 1)
+ %obit = extractvalue {i32, i1} %t, 1
+ ret i1 %obit
+
+; X32: test10:
+; X32: incl
+; X32-NEXT: seto
+
+; X64: test10:
+; X64: incl
+; X64-NEXT: seto
+}
diff --git a/test/CodeGen/X86/adde-carry.ll b/test/CodeGen/X86/adde-carry.ll
new file mode 100644
index 000000000000..98c4f9934318
--- /dev/null
+++ b/test/CodeGen/X86/adde-carry.ll
@@ -0,0 +1,26 @@
+; RUN: llc -march=x86-64 < %s | FileCheck %s -check-prefix=CHECK-64
+; RUN: llc -march=x86 < %s | FileCheck %s -check-prefix=CHECK-32
+
+define void @a(i64* nocapture %s, i64* nocapture %t, i64 %a, i64 %b, i64 %c) nounwind {
+entry:
+ %0 = zext i64 %a to i128
+ %1 = zext i64 %b to i128
+ %2 = add i128 %1, %0
+ %3 = zext i64 %c to i128
+ %4 = shl i128 %3, 64
+ %5 = add i128 %4, %2
+ %6 = lshr i128 %5, 64
+ %7 = trunc i128 %6 to i64
+ store i64 %7, i64* %s, align 8
+ %8 = trunc i128 %2 to i64
+ store i64 %8, i64* %t, align 8
+ ret void
+
+; CHECK-32: addl
+; CHECK-32: adcl
+; CHECK-32: adcl $0
+; CHECK-32: adcl $0
+
+; CHECK-64: addq
+; CHECK-64: adcq $0
+}
diff --git a/test/CodeGen/X86/aliases.ll b/test/CodeGen/X86/aliases.ll
index 3ed3bd67cef1..f92027998a40 100644
--- a/test/CodeGen/X86/aliases.ll
+++ b/test/CodeGen/X86/aliases.ll
@@ -1,6 +1,4 @@
; RUN: llc < %s -mtriple=i686-pc-linux-gnu -asm-verbose=false -o %t
-; RUN: grep { = } %t | count 16
-; RUN: grep set %t | count 18
; RUN: grep globl %t | count 6
; RUN: grep weak %t | count 1
; RUN: grep hidden %t | count 1
diff --git a/test/CodeGen/X86/alignment.ll b/test/CodeGen/X86/alignment.ll
index 9678e6df740e..7e911159790b 100644
--- a/test/CodeGen/X86/alignment.ll
+++ b/test/CodeGen/X86/alignment.ll
@@ -6,7 +6,7 @@
; CHECK: .bss
; CHECK: .globl GlobalA
-; CHECK: .align 16
+; CHECK: .align 8
; CHECK: GlobalA:
; CHECK: .zero 384
@@ -15,12 +15,12 @@
; PR6921
@GlobalB = common global { [384 x i8] } zeroinitializer, align 8
-; CHECK: .comm GlobalB,384,16
+; CHECK: .comm GlobalB,384,8
@GlobalC = common global { [384 x i8] } zeroinitializer, align 2
-; CHECK: .comm GlobalC,384,16
+; CHECK: .comm GlobalC,384,2
diff --git a/test/CodeGen/X86/apm.ll b/test/CodeGen/X86/apm.ll
index d0c64f243386..b514cf6427d5 100644
--- a/test/CodeGen/X86/apm.ll
+++ b/test/CodeGen/X86/apm.ll
@@ -1,10 +1,16 @@
-; RUN: llc < %s -o - -march=x86-64 | FileCheck %s
+; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s
+; RUN: llc < %s -mtriple=x86_64-win32 | FileCheck %s -check-prefix=WIN64
; PR8573
; CHECK: foo:
; CHECK: leaq (%rdi), %rax
; CHECK-NEXT: movl %esi, %ecx
; CHECK-NEXT: monitor
+; WIN64: foo:
+; WIN64: leaq (%rcx), %rax
+; WIN64-NEXT: movl %edx, %ecx
+; WIN64-NEXT: movl %r8d, %edx
+; WIN64-NEXT: monitor
define void @foo(i8* %P, i32 %E, i32 %H) nounwind {
entry:
tail call void @llvm.x86.sse3.monitor(i8* %P, i32 %E, i32 %H)
@@ -17,6 +23,9 @@ declare void @llvm.x86.sse3.monitor(i8*, i32, i32) nounwind
; CHECK: movl %edi, %ecx
; CHECK-NEXT: movl %esi, %eax
; CHECK-NEXT: mwait
+; WIN64: bar:
+; WIN64: movl %edx, %eax
+; WIN64-NEXT: mwait
define void @bar(i32 %E, i32 %H) nounwind {
entry:
tail call void @llvm.x86.sse3.mwait(i32 %E, i32 %H)
diff --git a/test/CodeGen/X86/avoid-lea-scale2.ll b/test/CodeGen/X86/avoid-lea-scale2.ll
index 8003de262d2c..cee2ee4e0399 100644
--- a/test/CodeGen/X86/avoid-lea-scale2.ll
+++ b/test/CodeGen/X86/avoid-lea-scale2.ll
@@ -1,4 +1,6 @@
-; RUN: llc < %s -march=x86-64 | grep {leal.*-2(\[%\]rdi,\[%\]rdi)}
+; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s
+; RUN: llc < %s -mtriple=x86_64-win32 | FileCheck %s
+; CHECK: leal -2({{%rdi,%rdi|%rcx,%rcx}})
define i32 @foo(i32 %x) nounwind readnone {
%t0 = shl i32 %x, 1
diff --git a/test/CodeGen/X86/avx-intrinsics-x86.ll b/test/CodeGen/X86/avx-intrinsics-x86.ll
index 6c32396a4177..5201688686d3 100644
--- a/test/CodeGen/X86/avx-intrinsics-x86.ll
+++ b/test/CodeGen/X86/avx-intrinsics-x86.ll
@@ -247,7 +247,7 @@ declare <2 x double> @llvm.x86.sse2.div.sd(<2 x double>, <2 x double>) nounwind
define <16 x i8> @test_x86_sse2_loadu_dq(i8* %a0) {
; CHECK: movl
- ; CHECK: vmovdqu
+ ; CHECK: vmovups
%res = call <16 x i8> @llvm.x86.sse2.loadu.dq(i8* %a0) ; <<16 x i8>> [#uses=1]
ret <16 x i8> %res
}
@@ -256,7 +256,7 @@ declare <16 x i8> @llvm.x86.sse2.loadu.dq(i8*) nounwind readonly
define <2 x double> @test_x86_sse2_loadu_pd(i8* %a0) {
; CHECK: movl
- ; CHECK: vmovupd
+ ; CHECK: vmovups
%res = call <2 x double> @llvm.x86.sse2.loadu.pd(i8* %a0) ; <<2 x double>> [#uses=1]
ret <2 x double> %res
}
diff --git a/test/CodeGen/X86/bool-zext.ll b/test/CodeGen/X86/bool-zext.ll
new file mode 100644
index 000000000000..d2c30c64f237
--- /dev/null
+++ b/test/CodeGen/X86/bool-zext.ll
@@ -0,0 +1,35 @@
+; RUN: llc < %s -march=x86-64 | FileCheck %s
+
+; CHECK: @bar1
+; CHECK: movzbl
+; CHECK: callq
+define void @bar1(i1 zeroext %v1) nounwind ssp {
+entry:
+ %conv = zext i1 %v1 to i32
+ %call = tail call i32 (...)* @foo1(i32 %conv) nounwind
+ ret void
+}
+
+; CHECK: @bar2
+; CHECK-NOT: movzbl
+; CHECK: callq
+define void @bar2(i8 zeroext %v1) nounwind ssp {
+entry:
+ %conv = zext i8 %v1 to i32
+ %call = tail call i32 (...)* @foo1(i32 %conv) nounwind
+ ret void
+}
+
+; CHECK: @bar3
+; CHECK: callq
+; CHECK-NOT: movzbl
+; CHECK-NOT: and
+; CHECK: ret
+define zeroext i1 @bar3() nounwind ssp {
+entry:
+ %call = call i1 @foo2() nounwind
+ ret i1 %call
+}
+
+declare i32 @foo1(...)
+declare zeroext i1 @foo2()
diff --git a/test/CodeGen/X86/break-anti-dependencies.ll b/test/CodeGen/X86/break-anti-dependencies.ll
index 972b3cd43cf6..93b20437e1e8 100644
--- a/test/CodeGen/X86/break-anti-dependencies.ll
+++ b/test/CodeGen/X86/break-anti-dependencies.ll
@@ -1,4 +1,5 @@
-; RUN: llc < %s -march=x86-64 -post-RA-scheduler -break-anti-dependencies=none > %t
+; Without list-burr scheduling we may not see the difference in codegen here.
+; RUN: llc < %s -march=x86-64 -post-RA-scheduler -pre-RA-sched=list-burr -break-anti-dependencies=none > %t
; RUN: grep {%xmm0} %t | count 14
; RUN: not grep {%xmm1} %t
; RUN: llc < %s -march=x86-64 -post-RA-scheduler -break-anti-dependencies=critical > %t
diff --git a/test/CodeGen/X86/byval.ll b/test/CodeGen/X86/byval.ll
index ac0bc094e56e..185eda1566d4 100644
--- a/test/CodeGen/X86/byval.ll
+++ b/test/CodeGen/X86/byval.ll
@@ -1,4 +1,5 @@
-; RUN: llc < %s -march=x86-64 | FileCheck -check-prefix=X86-64 %s
+; RUN: llc < %s -mtriple=x86_64-linux | FileCheck -check-prefix=X86-64 %s
+; Win64 has not supported byval yet.
; RUN: llc < %s -march=x86 | FileCheck -check-prefix=X86 %s
; X86: movl 4(%esp), %eax
diff --git a/test/CodeGen/X86/byval2.ll b/test/CodeGen/X86/byval2.ll
index 71129f5f6c9b..03a9f0fb742a 100644
--- a/test/CodeGen/X86/byval2.ll
+++ b/test/CodeGen/X86/byval2.ll
@@ -1,5 +1,28 @@
-; RUN: llc < %s -march=x86-64 | grep rep.movsq | count 2
-; RUN: llc < %s -march=x86 | grep rep.movsl | count 2
+; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s -check-prefix=X64
+; X64-NOT: movsq
+; X64: rep
+; X64-NOT: rep
+; X64: movsq
+; X64-NOT: movsq
+; X64: rep
+; X64-NOT: rep
+; X64: movsq
+; X64-NOT: rep
+; X64-NOT: movsq
+
+; Win64 has not supported byval yet.
+
+; RUN: llc < %s -march=x86 | FileCheck %s -check-prefix=X32
+; X32-NOT: movsl
+; X32: rep
+; X32-NOT: rep
+; X32: movsl
+; X32-NOT: movsl
+; X32: rep
+; X32-NOT: rep
+; X32: movsl
+; X32-NOT: rep
+; X32-NOT: movsl
%struct.s = type { i64, i64, i64, i64, i64, i64, i64, i64,
i64, i64, i64, i64, i64, i64, i64, i64,
diff --git a/test/CodeGen/X86/byval3.ll b/test/CodeGen/X86/byval3.ll
index 504e0bed7916..8d5bb6d972d7 100644
--- a/test/CodeGen/X86/byval3.ll
+++ b/test/CodeGen/X86/byval3.ll
@@ -1,5 +1,28 @@
-; RUN: llc < %s -march=x86-64 | grep rep.movsq | count 2
-; RUN: llc < %s -march=x86 | grep rep.movsl | count 2
+; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s -check-prefix=X64
+; X64-NOT: movsq
+; X64: rep
+; X64-NOT: rep
+; X64: movsq
+; X64-NOT: movsq
+; X64: rep
+; X64-NOT: rep
+; X64: movsq
+; X64-NOT: rep
+; X64-NOT: movsq
+
+; Win64 has not supported byval yet.
+
+; RUN: llc < %s -march=x86 | FileCheck %s -check-prefix=X32
+; X32-NOT: movsl
+; X32: rep
+; X32-NOT: rep
+; X32: movsl
+; X32-NOT: movsl
+; X32: rep
+; X32-NOT: rep
+; X32: movsl
+; X32-NOT: rep
+; X32-NOT: movsl
%struct.s = type { i32, i32, i32, i32, i32, i32, i32, i32,
i32, i32, i32, i32, i32, i32, i32, i32,
diff --git a/test/CodeGen/X86/byval4.ll b/test/CodeGen/X86/byval4.ll
index 4db9d650b439..ae1a79a1e103 100644
--- a/test/CodeGen/X86/byval4.ll
+++ b/test/CodeGen/X86/byval4.ll
@@ -1,5 +1,28 @@
-; RUN: llc < %s -march=x86-64 | grep rep.movsq | count 2
-; RUN: llc < %s -march=x86 | grep rep.movsl | count 2
+; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s -check-prefix=X64
+; X64-NOT: movsq
+; X64: rep
+; X64-NOT: rep
+; X64: movsq
+; X64-NOT: movsq
+; X64: rep
+; X64-NOT: rep
+; X64: movsq
+; X64-NOT: rep
+; X64-NOT: movsq
+
+; Win64 has not supported byval yet.
+
+; RUN: llc < %s -march=x86 | FileCheck %s -check-prefix=X32
+; X32-NOT: movsl
+; X32: rep
+; X32-NOT: rep
+; X32: movsl
+; X32-NOT: movsl
+; X32: rep
+; X32-NOT: rep
+; X32: movsl
+; X32-NOT: rep
+; X32-NOT: movsl
%struct.s = type { i16, i16, i16, i16, i16, i16, i16, i16,
i16, i16, i16, i16, i16, i16, i16, i16,
diff --git a/test/CodeGen/X86/byval5.ll b/test/CodeGen/X86/byval5.ll
index 69c115b97326..a376709d7346 100644
--- a/test/CodeGen/X86/byval5.ll
+++ b/test/CodeGen/X86/byval5.ll
@@ -1,5 +1,28 @@
-; RUN: llc < %s -march=x86-64 | grep rep.movsq | count 2
-; RUN: llc < %s -march=x86 | grep rep.movsl | count 2
+; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s -check-prefix=X64
+; X64-NOT: movsq
+; X64: rep
+; X64-NOT: rep
+; X64: movsq
+; X64-NOT: movsq
+; X64: rep
+; X64-NOT: rep
+; X64: movsq
+; X64-NOT: rep
+; X64-NOT: movsq
+
+; Win64 has not supported byval yet.
+
+; RUN: llc < %s -march=x86 | FileCheck %s -check-prefix=X32
+; X32-NOT: movsl
+; X32: rep
+; X32-NOT: rep
+; X32: movsl
+; X32-NOT: movsl
+; X32: rep
+; X32-NOT: rep
+; X32: movsl
+; X32-NOT: rep
+; X32-NOT: movsl
%struct.s = type { i8, i8, i8, i8, i8, i8, i8, i8,
i8, i8, i8, i8, i8, i8, i8, i8,
diff --git a/test/CodeGen/X86/call-push.ll b/test/CodeGen/X86/call-push.ll
index 02cbccc1a492..8cca10c83073 100644
--- a/test/CodeGen/X86/call-push.ll
+++ b/test/CodeGen/X86/call-push.ll
@@ -27,3 +27,19 @@ UnifiedReturnBlock: ; preds = %entry
}
declare i32 @f(%struct.decode_t*)
+
+
+; There should be no store for the undef operand.
+
+; CHECK: _test2:
+; CHECK-NOT: 8(%esp)
+; CHECK: 4(%esp)
+; CHECK-NOT: 8(%esp)
+; CHECK: calll
+declare i32 @foo(i32, i32, i32)
+
+define void @test2() nounwind {
+entry:
+ %call = call i32 @foo(i32 8, i32 6, i32 undef)
+ ret void
+}
diff --git a/test/CodeGen/X86/coalesce-esp.ll b/test/CodeGen/X86/coalesce-esp.ll
index e0f2796f9dce..a5848763c98d 100644
--- a/test/CodeGen/X86/coalesce-esp.ll
+++ b/test/CodeGen/X86/coalesce-esp.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s | grep {movl %esp, %ecx}
+; RUN: llc < %s | grep {movl %esp, %ebp}
; PR4572
; Don't coalesce with %esp if it would end up putting %esp in
diff --git a/test/CodeGen/X86/coalescer-commute2.ll b/test/CodeGen/X86/coalescer-commute2.ll
index 5d10bbad09ef..730692093de0 100644
--- a/test/CodeGen/X86/coalescer-commute2.ll
+++ b/test/CodeGen/X86/coalescer-commute2.ll
@@ -1,5 +1,10 @@
-; RUN: llc < %s -march=x86-64 | grep paddw | count 2
-; RUN: llc < %s -march=x86-64 | not grep mov
+; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s
+; CHECK-NOT: mov
+; CHECK: paddw
+; CHECK-NOT: mov
+; CHECK: paddw
+; CHECK-NOT: paddw
+; CHECK-NOT: mov
; The 2-addr pass should ensure that identical code is produced for these functions
; no extra copy should be generated.
diff --git a/test/CodeGen/X86/coalescer-cross.ll b/test/CodeGen/X86/coalescer-cross.ll
index 7d6f399930fd..976db6479e09 100644
--- a/test/CodeGen/X86/coalescer-cross.ll
+++ b/test/CodeGen/X86/coalescer-cross.ll
@@ -1,6 +1,10 @@
-; RUN: llc < %s -mtriple=i386-apple-darwin10 | not grep movaps
+; RUN: llc < %s -mtriple=i386-apple-darwin10 | FileCheck %s
+; RUN: llc < %s -mtriple=i386-apple-darwin10 -regalloc=basic | FileCheck %s
; rdar://6509240
+; CHECK: os_clock
+; CHECK-NOT: movaps
+
type { %struct.TValue } ; type %0
type { %struct.L_Umaxalign, i32, %struct.Node* } ; type %1
%struct.CallInfo = type { %struct.TValue*, %struct.TValue*, %struct.TValue*, i32*, i32, i32 }
diff --git a/test/CodeGen/X86/commute-two-addr.ll b/test/CodeGen/X86/commute-two-addr.ll
index 89b436e75c9e..ef44a3d119b8 100644
--- a/test/CodeGen/X86/commute-two-addr.ll
+++ b/test/CodeGen/X86/commute-two-addr.ll
@@ -38,11 +38,10 @@ define i32 @t2(i32 %X, i32 %Y) nounwind {
define %0 @t3(i32 %lb, i8 zeroext %has_lb, i8 zeroext %lb_inclusive, i32 %ub, i8 zeroext %has_ub, i8 zeroext %ub_inclusive) nounwind {
entry:
; DARWIN: t3:
+; DARWIN: shll $16
; DARWIN: shlq $32, %rcx
; DARWIN-NOT: leaq
; DARWIN: orq %rcx, %rax
-; DARWIN-NOT: mov
-; DARWIN: shll $16
%tmp21 = zext i32 %lb to i64
%tmp23 = zext i32 %ub to i64
%tmp24 = shl i64 %tmp23, 32
diff --git a/test/CodeGen/X86/constant-pool-remat-0.ll b/test/CodeGen/X86/constant-pool-remat-0.ll
index 2a44463e5d32..4be14d2128ef 100644
--- a/test/CodeGen/X86/constant-pool-remat-0.ll
+++ b/test/CodeGen/X86/constant-pool-remat-0.ll
@@ -1,7 +1,16 @@
-; RUN: llc < %s -march=x86-64 | grep LCPI | count 3
-; RUN: llc < %s -march=x86-64 -o /dev/null -stats -info-output-file - | grep asm-printer | grep 6
-; RUN: llc < %s -march=x86 -mattr=+sse2 | grep LCPI | count 3
-; RUN: llc < %s -march=x86 -mattr=+sse2 -o /dev/null -stats -info-output-file - | grep asm-printer | grep 12
+; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s
+; RUN: llc < %s -mtriple=x86_64-linux -regalloc=greedy | FileCheck %s
+; RUN: llc < %s -march=x86 -mattr=+sse2 | FileCheck %s
+; CHECK: LCPI
+; CHECK: LCPI
+; CHECK: LCPI
+; CHECK-NOT: LCPI
+
+; RUN: llc < %s -mtriple=x86_64-linux -o /dev/null -stats -info-output-file - | FileCheck %s -check-prefix=X64stat
+; X64stat: 6 asm-printer
+
+; RUN: llc < %s -march=x86 -mattr=+sse2 -o /dev/null -stats -info-output-file - | FileCheck %s -check-prefix=X32stat
+; X32stat: 12 asm-printer
declare float @qux(float %y)
diff --git a/test/CodeGen/X86/convert-2-addr-3-addr-inc64.ll b/test/CodeGen/X86/convert-2-addr-3-addr-inc64.ll
index 17cb2b305721..b82348b32e43 100644
--- a/test/CodeGen/X86/convert-2-addr-3-addr-inc64.ll
+++ b/test/CodeGen/X86/convert-2-addr-3-addr-inc64.ll
@@ -1,6 +1,10 @@
-; RUN: llc < %s -march=x86-64 -o %t -stats -info-output-file - | \
-; RUN: grep {asm-printer} | grep {Number of machine instrs printed} | grep 9
-; RUN: grep {leal 1(\%rsi),} %t
+; RUN: llc < %s -mtriple=x86_64-linux -o /dev/null -stats |& FileCheck %s -check-prefix=STATS
+; RUN: llc < %s -mtriple=x86_64-win32 -o /dev/null -stats |& FileCheck %s -check-prefix=STATS
+; STATS: 9 asm-printer
+
+; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s
+; RUN: llc < %s -mtriple=x86_64-win32 | FileCheck %s
+; CHECK: leal 1({{%rsi|%rdx}}),
define fastcc zeroext i8 @fullGtU(i32 %i1, i32 %i2, i8* %ptr) nounwind optsize {
entry:
diff --git a/test/CodeGen/X86/crash.ll b/test/CodeGen/X86/crash.ll
index 2d8e63e31342..7c4e64cdf6f2 100644
--- a/test/CodeGen/X86/crash.ll
+++ b/test/CodeGen/X86/crash.ll
@@ -189,7 +189,7 @@ for.inc44: ; preds = %for.body
}
; PR9028
-define void @f(i64 %A) nounwind {
+define void @func_60(i64 %A) nounwind {
entry:
%0 = zext i64 %A to i160
%1 = shl i160 %0, 64
@@ -199,3 +199,19 @@ entry:
store i576 %4, i576* undef, align 8
ret void
}
+
+; <rdar://problem/9187792>
+define fastcc void @func_61() nounwind sspreq {
+entry:
+ %t1 = tail call i64 @llvm.objectsize.i64(i8* undef, i1 false)
+ %t2 = icmp eq i64 %t1, -1
+ br i1 %t2, label %bb2, label %bb1
+
+bb1:
+ ret void
+
+bb2:
+ ret void
+}
+
+declare i64 @llvm.objectsize.i64(i8*, i1) nounwind readnone
diff --git a/test/CodeGen/X86/dbg-declare-arg.ll b/test/CodeGen/X86/dbg-declare-arg.ll
new file mode 100644
index 000000000000..367c1ef36c60
--- /dev/null
+++ b/test/CodeGen/X86/dbg-declare-arg.ll
@@ -0,0 +1,123 @@
+; RUN: llc -O0 -fast-isel=false < %s | FileCheck %s
+target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
+target triple = "x86_64-apple-macosx10.6.7"
+;Radar 9321650
+
+;CHECK: ##DEBUG_VALUE: my_a
+
+%class.A = type { i32, i32, i32, i32 }
+
+define void @_Z3fooi(%class.A* sret %agg.result, i32 %i) ssp {
+entry:
+ %i.addr = alloca i32, align 4
+ %j = alloca i32, align 4
+ %nrvo = alloca i1
+ %cleanup.dest.slot = alloca i32
+ store i32 %i, i32* %i.addr, align 4
+ call void @llvm.dbg.declare(metadata !{i32* %i.addr}, metadata !26), !dbg !27
+ call void @llvm.dbg.declare(metadata !{i32* %j}, metadata !28), !dbg !30
+ store i32 0, i32* %j, align 4, !dbg !31
+ %tmp = load i32* %i.addr, align 4, !dbg !32
+ %cmp = icmp eq i32 %tmp, 42, !dbg !32
+ br i1 %cmp, label %if.then, label %if.end, !dbg !32
+
+if.then: ; preds = %entry
+ %tmp1 = load i32* %i.addr, align 4, !dbg !33
+ %add = add nsw i32 %tmp1, 1, !dbg !33
+ store i32 %add, i32* %j, align 4, !dbg !33
+ br label %if.end, !dbg !35
+
+if.end: ; preds = %if.then, %entry
+ store i1 false, i1* %nrvo, !dbg !36
+ call void @llvm.dbg.declare(metadata !{%class.A* %agg.result}, metadata !37), !dbg !39
+ %tmp2 = load i32* %j, align 4, !dbg !40
+ %x = getelementptr inbounds %class.A* %agg.result, i32 0, i32 0, !dbg !40
+ store i32 %tmp2, i32* %x, align 4, !dbg !40
+ store i1 true, i1* %nrvo, !dbg !41
+ store i32 1, i32* %cleanup.dest.slot
+ %nrvo.val = load i1* %nrvo, !dbg !42
+ br i1 %nrvo.val, label %nrvo.skipdtor, label %nrvo.unused, !dbg !42
+
+nrvo.unused: ; preds = %if.end
+ call void @_ZN1AD1Ev(%class.A* %agg.result), !dbg !42
+ br label %nrvo.skipdtor, !dbg !42
+
+nrvo.skipdtor: ; preds = %nrvo.unused, %if.end
+ ret void, !dbg !42
+}
+
+declare void @llvm.dbg.declare(metadata, metadata) nounwind readnone
+
+define linkonce_odr void @_ZN1AD1Ev(%class.A* %this) unnamed_addr ssp align 2 {
+entry:
+ %this.addr = alloca %class.A*, align 8
+ store %class.A* %this, %class.A** %this.addr, align 8
+ call void @llvm.dbg.declare(metadata !{%class.A** %this.addr}, metadata !43), !dbg !44
+ %this1 = load %class.A** %this.addr
+ call void @_ZN1AD2Ev(%class.A* %this1)
+ ret void, !dbg !45
+}
+
+define linkonce_odr void @_ZN1AD2Ev(%class.A* %this) unnamed_addr nounwind ssp align 2 {
+entry:
+ %this.addr = alloca %class.A*, align 8
+ store %class.A* %this, %class.A** %this.addr, align 8
+ call void @llvm.dbg.declare(metadata !{%class.A** %this.addr}, metadata !46), !dbg !47
+ %this1 = load %class.A** %this.addr
+ %x = getelementptr inbounds %class.A* %this1, i32 0, i32 0, !dbg !48
+ store i32 1, i32* %x, align 4, !dbg !48
+ ret void, !dbg !48
+}
+
+!llvm.dbg.sp = !{!0, !10, !14, !19, !22, !25}
+
+!0 = metadata !{i32 589870, i32 0, metadata !1, metadata !"~A", metadata !"~A", metadata !"", metadata !3, i32 2, metadata !11, i1 false, i1 false, i32 0, i32 0, null, i32 256, i1 false, null, null} ; [ DW_TAG_subprogram ]
+!1 = metadata !{i32 589826, metadata !2, metadata !"A", metadata !3, i32 2, i64 128, i64 32, i32 0, i32 0, null, metadata !4, i32 0, null, null} ; [ DW_TAG_class_type ]
+!2 = metadata !{i32 589841, i32 0, i32 4, metadata !"a.cc", metadata !"/private/tmp", metadata !"clang version 3.0 (trunk 130127)", i1 true, i1 false, metadata !"", i32 0} ; [ DW_TAG_compile_unit ]
+!3 = metadata !{i32 589865, metadata !"a.cc", metadata !"/private/tmp", metadata !2} ; [ DW_TAG_file_type ]
+!4 = metadata !{metadata !5, metadata !7, metadata !8, metadata !9, metadata !0, metadata !10, metadata !14}
+!5 = metadata !{i32 589837, metadata !3, metadata !"x", metadata !3, i32 2, i64 32, i64 32, i64 0, i32 0, metadata !6} ; [ DW_TAG_member ]
+!6 = metadata !{i32 589860, metadata !2, metadata !"int", null, i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ]
+!7 = metadata !{i32 589837, metadata !3, metadata !"y", metadata !3, i32 2, i64 32, i64 32, i64 32, i32 0, metadata !6} ; [ DW_TAG_member ]
+!8 = metadata !{i32 589837, metadata !3, metadata !"z", metadata !3, i32 2, i64 32, i64 32, i64 64, i32 0, metadata !6} ; [ DW_TAG_member ]
+!9 = metadata !{i32 589837, metadata !3, metadata !"o", metadata !3, i32 2, i64 32, i64 32, i64 96, i32 0, metadata !6} ; [ DW_TAG_member ]
+!10 = metadata !{i32 589870, i32 0, metadata !1, metadata !"A", metadata !"A", metadata !"", metadata !3, i32 2, metadata !11, i1 false, i1 false, i32 0, i32 0, null, i32 320, i1 false, null, null} ; [ DW_TAG_subprogram ]
+!11 = metadata !{i32 589845, metadata !3, metadata !"", metadata !3, i32 0, i64 0, i64 0, i32 0, i32 0, i32 0, metadata !12, i32 0, i32 0} ; [ DW_TAG_subroutine_type ]
+!12 = metadata !{null, metadata !13}
+!13 = metadata !{i32 589839, metadata !2, metadata !"", i32 0, i32 0, i64 64, i64 64, i64 0, i32 64, metadata !1} ; [ DW_TAG_pointer_type ]
+!14 = metadata !{i32 589870, i32 0, metadata !1, metadata !"A", metadata !"A", metadata !"", metadata !3, i32 2, metadata !15, i1 false, i1 false, i32 0, i32 0, null, i32 320, i1 false, null, null} ; [ DW_TAG_subprogram ]
+!15 = metadata !{i32 589845, metadata !3, metadata !"", metadata !3, i32 0, i64 0, i64 0, i32 0, i32 0, i32 0, metadata !16, i32 0, i32 0} ; [ DW_TAG_subroutine_type ]
+!16 = metadata !{null, metadata !13, metadata !17}
+!17 = metadata !{i32 589840, metadata !2, null, null, i32 0, i64 0, i64 0, i64 0, i32 0, metadata !18} ; [ DW_TAG_reference_type ]
+!18 = metadata !{i32 589862, metadata !2, metadata !"", null, i32 0, i64 0, i64 0, i64 0, i32 0, metadata !1} ; [ DW_TAG_const_type ]
+!19 = metadata !{i32 589870, i32 0, metadata !3, metadata !"foo", metadata !"foo", metadata !"_Z3fooi", metadata !3, i32 4, metadata !20, i1 false, i1 true, i32 0, i32 0, i32 0, i32 256, i1 false, void (%class.A*, i32)* @_Z3fooi, null, null} ; [ DW_TAG_subprogram ]
+!20 = metadata !{i32 589845, metadata !3, metadata !"", metadata !3, i32 0, i64 0, i64 0, i32 0, i32 0, i32 0, metadata !21, i32 0, i32 0} ; [ DW_TAG_subroutine_type ]
+!21 = metadata !{metadata !1}
+!22 = metadata !{i32 589870, i32 0, metadata !3, metadata !"~A", metadata !"~A", metadata !"_ZN1AD1Ev", metadata !3, i32 2, metadata !23, i1 false, i1 true, i32 0, i32 0, i32 0, i32 256, i1 false, void (%class.A*)* @_ZN1AD1Ev, null, null} ; [ DW_TAG_subprogram ]
+!23 = metadata !{i32 589845, metadata !3, metadata !"", metadata !3, i32 0, i64 0, i64 0, i32 0, i32 0, i32 0, metadata !24, i32 0, i32 0} ; [ DW_TAG_subroutine_type ]
+!24 = metadata !{null}
+!25 = metadata !{i32 589870, i32 0, metadata !3, metadata !"~A", metadata !"~A", metadata !"_ZN1AD2Ev", metadata !3, i32 2, metadata !23, i1 false, i1 true, i32 0, i32 0, i32 0, i32 256, i1 false, void (%class.A*)* @_ZN1AD2Ev, null, null} ; [ DW_TAG_subprogram ]
+!26 = metadata !{i32 590081, metadata !19, metadata !"i", metadata !3, i32 16777220, metadata !6, i32 0} ; [ DW_TAG_arg_variable ]
+!27 = metadata !{i32 4, i32 11, metadata !19, null}
+!28 = metadata !{i32 590080, metadata !29, metadata !"j", metadata !3, i32 5, metadata !6, i32 0} ; [ DW_TAG_auto_variable ]
+!29 = metadata !{i32 589835, metadata !19, i32 4, i32 14, metadata !3, i32 0} ; [ DW_TAG_lexical_block ]
+!30 = metadata !{i32 5, i32 7, metadata !29, null}
+!31 = metadata !{i32 5, i32 12, metadata !29, null}
+!32 = metadata !{i32 6, i32 3, metadata !29, null}
+!33 = metadata !{i32 7, i32 5, metadata !34, null}
+!34 = metadata !{i32 589835, metadata !29, i32 6, i32 16, metadata !3, i32 1} ; [ DW_TAG_lexical_block ]
+!35 = metadata !{i32 8, i32 3, metadata !34, null}
+!36 = metadata !{i32 9, i32 9, metadata !29, null}
+!37 = metadata !{i32 590080, metadata !29, metadata !"my_a", metadata !3, i32 9, metadata !38, i32 0} ; [ DW_TAG_auto_variable ]
+!38 = metadata !{i32 589840, metadata !2, null, null, i32 0, i64 0, i64 0, i64 0, i32 0, metadata !1} ; [ DW_TAG_reference_type ]
+!39 = metadata !{i32 9, i32 5, metadata !29, null}
+!40 = metadata !{i32 10, i32 3, metadata !29, null}
+!41 = metadata !{i32 11, i32 3, metadata !29, null}
+!42 = metadata !{i32 12, i32 1, metadata !29, null}
+!43 = metadata !{i32 590081, metadata !22, metadata !"this", metadata !3, i32 16777218, metadata !13, i32 64} ; [ DW_TAG_arg_variable ]
+!44 = metadata !{i32 2, i32 47, metadata !22, null}
+!45 = metadata !{i32 2, i32 61, metadata !22, null}
+!46 = metadata !{i32 590081, metadata !25, metadata !"this", metadata !3, i32 16777218, metadata !13, i32 64} ; [ DW_TAG_arg_variable ]
+!47 = metadata !{i32 2, i32 47, metadata !25, null}
+!48 = metadata !{i32 2, i32 54, metadata !49, null}
+!49 = metadata !{i32 589835, metadata !25, i32 2, i32 52, metadata !3, i32 2} ; [ DW_TAG_lexical_block ]
diff --git a/test/CodeGen/X86/dbg-file-name.ll b/test/CodeGen/X86/dbg-file-name.ll
new file mode 100644
index 000000000000..e7d5f924aa8a
--- /dev/null
+++ b/test/CodeGen/X86/dbg-file-name.ll
@@ -0,0 +1,19 @@
+; RUN: llc -mtriple x86_64-apple-darwin10.0.0 < %s | FileCheck %s
+
+; Radar 8884898
+; CHECK: file 1 "/Users/manav/one/two/simple.c"
+
+declare i32 @printf(i8*, ...) nounwind
+
+define i32 @main() nounwind {
+ ret i32 0
+}
+
+!llvm.dbg.sp = !{ !6}
+
+!1 = metadata !{i32 589865, metadata !"simple.c", metadata !"/Users/manav/one/two", metadata !2} ; [ DW_TAG_file_type ]
+!2 = metadata !{i32 589841, i32 0, i32 1, metadata !"simple.c", metadata !"/Users/manav/one/two", metadata !"LLVM build 00", i1 true, i1 false, metadata !"", i32 0} ; [ DW_TAG_compile_unit ]
+!5 = metadata !{i32 589860, metadata !1, metadata !"int", metadata !1, i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ]
+!6 = metadata !{i32 589870, i32 0, metadata !1, metadata !"main", metadata !"main", metadata !"main", metadata !1, i32 9, metadata !7, i1 false, i1 true, i32 0, i32 0, null, i32 256, i1 false, i32 ()* @main} ; [ DW_TAG_subprogram ]
+!7 = metadata !{i32 589845, metadata !1, metadata !"", metadata !1, i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !8, i32 0, null} ; [ DW_TAG_subroutine_type ]
+!8 = metadata !{metadata !5}
diff --git a/test/CodeGen/X86/dbg-merge-loc-entry.ll b/test/CodeGen/X86/dbg-merge-loc-entry.ll
index 83df1478cf18..76b93dd42777 100644
--- a/test/CodeGen/X86/dbg-merge-loc-entry.ll
+++ b/test/CodeGen/X86/dbg-merge-loc-entry.ll
@@ -1,10 +1,11 @@
; RUN: llc < %s | FileCheck %s
+; RUN: llc < %s -regalloc=basic | FileCheck %s
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
target triple = "x86_64-apple-darwin8"
;CHECK: Ldebug_loc0:
;CHECK-NEXT: .quad Lfunc_begin0
-;CHECK-NEXT: .quad Lfunc_end0
+;CHECK-NEXT: .quad L
;CHECK-NEXT: .short 1 ## Loc expr size
;CHECK-NEXT: .byte 85 ## DW_OP_reg5
;CHECK-NEXT: .quad 0
diff --git a/test/CodeGen/X86/dbg-value-inlined-parameter.ll b/test/CodeGen/X86/dbg-value-inlined-parameter.ll
index 89bbf34a1286..481c4ba4a49a 100644
--- a/test/CodeGen/X86/dbg-value-inlined-parameter.ll
+++ b/test/CodeGen/X86/dbg-value-inlined-parameter.ll
@@ -1,4 +1,5 @@
; RUN: llc -mtriple=x86_64-apple-darwin < %s | FileCheck %s
+; RUN: llc -mtriple=x86_64-apple-darwin -regalloc=basic < %s | FileCheck %s
;CHECK: DW_TAG_inlined_subroutine
;CHECK-NEXT: DW_AT_abstract_origin
diff --git a/test/CodeGen/X86/dbg-value-location.ll b/test/CodeGen/X86/dbg-value-location.ll
index 87d7e910c339..a0e4d16246ff 100644
--- a/test/CodeGen/X86/dbg-value-location.ll
+++ b/test/CodeGen/X86/dbg-value-location.ll
@@ -1,4 +1,5 @@
; RUN: llc < %s | FileCheck %s
+; RUN: llc < %s -regalloc=basic | FileCheck %s
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
target triple = "x86_64-apple-darwin10.0.0"
;Radar 8950491
diff --git a/test/CodeGen/X86/dbg-value-range.ll b/test/CodeGen/X86/dbg-value-range.ll
index 2985224d9dbd..da49f2dee1a7 100644
--- a/test/CodeGen/X86/dbg-value-range.ll
+++ b/test/CodeGen/X86/dbg-value-range.ll
@@ -1,4 +1,5 @@
-; RUN: llc -mtriple=x86_64-apple-darwin < %s | FileCheck %s
+; RUN: llc -mtriple=x86_64-apple-darwin10 < %s | FileCheck %s
+; RUN: llc -mtriple=x86_64-apple-darwin10 -regalloc=basic < %s | FileCheck %s
%struct.a = type { i32 }
@@ -41,15 +42,17 @@ declare void @llvm.dbg.value(metadata, i64, metadata) nounwind readnone
!18 = metadata !{i32 7, i32 2, metadata !12, null}
!19 = metadata !{i32 8, i32 2, metadata !12, null}
-; check that variable bar:b value range is appropriately trucated in debug info. Here Ltmp5 is end of
-; location range.
+; Check that variable bar:b value range is appropriately trucated in debug info.
+; The variable is in %rdi which is clobbered by 'movl %ebx, %edi'
+; Here Ltmp7 is the end of the location range.
-;CHECK:Ltmp6
-;CHECK-NEXT: DEBUG_VALUE: bar:b <- undef
+;CHECK: .loc 1 7 2
+;CHECK: movl
+;CHECK-NEXT: [[CLOBBER:Ltmp[0-9]*]]
;CHECK:Ldebug_loc0:
-;CHECK-NEXT: .quad Ltmp
-;CHECK-NEXT: .quad Ltmp6
+;CHECK-NEXT: .quad
+;CHECK-NEXT: .quad [[CLOBBER]]
;CHECK-NEXT: .short 1
;CHECK-NEXT: .byte 85
;CHECK-NEXT: .quad 0
diff --git a/test/CodeGen/X86/divide-by-constant.ll b/test/CodeGen/X86/divide-by-constant.ll
index fe335b9369cb..08e3272a3707 100644
--- a/test/CodeGen/X86/divide-by-constant.ll
+++ b/test/CodeGen/X86/divide-by-constant.ll
@@ -60,3 +60,14 @@ entry:
; CHECK: shrl $31, %ecx
; CHECK: sarl $18, %eax
}
+
+define i32 @test7(i32 %x) nounwind {
+ %div = udiv i32 %x, 28
+ ret i32 %div
+; CHECK: test7:
+; CHECK: shrl $2
+; CHECK: movl $613566757
+; CHECK: mull
+; CHECK-NOT: shrl
+; CHECK: ret
+}
diff --git a/test/CodeGen/X86/dyn-stackalloc.ll b/test/CodeGen/X86/dyn-stackalloc.ll
index e577611ebcf1..7b0fe18f65c1 100644
--- a/test/CodeGen/X86/dyn-stackalloc.ll
+++ b/test/CodeGen/X86/dyn-stackalloc.ll
@@ -1,6 +1,9 @@
-; RUN: llc < %s -mtriple=i686-linux | not egrep {\\\$4294967289|-7}
-; RUN: llc < %s -mtriple=i686-linux | egrep {\\\$4294967280|-16}
-; RUN: llc < %s -mtriple=x86_64-linux | grep {\\-16}
+; RUN: llc < %s -mtriple=i686-linux | FileCheck %s -check-prefix=X32
+; X32-NOT: {{$429496728|-7}}
+; X32: {{$4294967280|-16}}
+; X32-NOT: {{$429496728|-7}}
+; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s -check-prefix=X64
+; X64: -16
define void @t() nounwind {
A:
diff --git a/test/CodeGen/X86/fast-isel-gep.ll b/test/CodeGen/X86/fast-isel-gep.ll
index fbe0243716bd..48abfd0f26e5 100644
--- a/test/CodeGen/X86/fast-isel-gep.ll
+++ b/test/CodeGen/X86/fast-isel-gep.ll
@@ -87,4 +87,23 @@ define i64 @test5(i8* %A, i32 %I, i64 %B) nounwind {
; X64-NEXT: ret
}
+; PR9500, rdar://9156159 - Don't do non-local address mode folding,
+; because it may require values which wouldn't otherwise be live out
+; of their blocks.
+define void @test6() {
+if.end: ; preds = %if.then, %invoke.cont
+ %tmp15 = load i64* undef
+ %dec = add i64 %tmp15, 13
+ store i64 %dec, i64* undef
+ %call17 = invoke i8* @_ZNK18G__FastAllocString4dataEv()
+ to label %invoke.cont16 unwind label %lpad
+invoke.cont16: ; preds = %if.then14
+ %arrayidx18 = getelementptr inbounds i8* %call17, i64 %dec
+ store i8 0, i8* %arrayidx18
+ unreachable
+
+lpad: ; preds = %if.end19, %if.then14, %if.end, %entry
+ unreachable
+}
+declare i8* @_ZNK18G__FastAllocString4dataEv() nounwind
diff --git a/test/CodeGen/X86/fast-isel-i1.ll b/test/CodeGen/X86/fast-isel-i1.ll
index d0665783ce64..5d572c1de500 100644
--- a/test/CodeGen/X86/fast-isel-i1.ll
+++ b/test/CodeGen/X86/fast-isel-i1.ll
@@ -1,19 +1,40 @@
-; RUN: llc < %s -march=x86 -fast-isel | grep {andb \$1, %}
+; RUN: llc < %s -march=x86 -fast-isel | FileCheck %s
-declare i64 @bar(i64)
+declare i64 @test1a(i64)
-define i32 @foo(i64 %x) nounwind {
- %y = add i64 %x, -3 ; <i64> [#uses=1]
- %t = call i64 @bar(i64 %y) ; <i64> [#uses=1]
- %s = mul i64 %t, 77 ; <i64> [#uses=1]
- %z = trunc i64 %s to i1 ; <i1> [#uses=1]
+define i32 @test1(i64 %x) nounwind {
+; CHECK: test1:
+; CHECK: andb $1, %
+ %y = add i64 %x, -3
+ %t = call i64 @test1a(i64 %y)
+ %s = mul i64 %t, 77
+ %z = trunc i64 %s to i1
br label %next
next: ; preds = %0
- %u = zext i1 %z to i32 ; <i32> [#uses=1]
- %v = add i32 %u, 1999 ; <i32> [#uses=1]
+ %u = zext i1 %z to i32
+ %v = add i32 %u, 1999
br label %exit
exit: ; preds = %next
ret i32 %v
}
+
+define void @test2(i8* %a) nounwind {
+entry:
+; CHECK: test2:
+; CHECK: movb {{.*}} %al
+; CHECK-NEXT: xorb $1, %al
+; CHECK-NEXT: testb $1
+ %tmp = load i8* %a, align 1
+ %tobool = trunc i8 %tmp to i1
+ %tobool2 = xor i1 %tobool, true
+ br i1 %tobool2, label %if.then, label %if.end
+
+if.then:
+ call void @test2(i8* null)
+ br label %if.end
+
+if.end:
+ ret void
+}
diff --git a/test/CodeGen/X86/fast-isel-shift-imm.ll b/test/CodeGen/X86/fast-isel-shift-imm.ll
deleted file mode 100644
index 5c62c1880516..000000000000
--- a/test/CodeGen/X86/fast-isel-shift-imm.ll
+++ /dev/null
@@ -1,8 +0,0 @@
-; RUN: llc < %s -march=x86 -O0 | grep {sarl \$80, %e}
-; PR3242
-
-define void @foo(i32 %x, i32* %p) nounwind {
- %y = ashr i32 %x, 50000
- store i32 %y, i32* %p
- ret void
-}
diff --git a/test/CodeGen/X86/fast-isel-x86-64.ll b/test/CodeGen/X86/fast-isel-x86-64.ll
new file mode 100644
index 000000000000..c4afc10ffab8
--- /dev/null
+++ b/test/CodeGen/X86/fast-isel-x86-64.ll
@@ -0,0 +1,262 @@
+; RUN: llc < %s -fast-isel -O0 -regalloc=fast -asm-verbose=0 -fast-isel-abort | FileCheck %s
+
+target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
+target triple = "x86_64-apple-darwin10.0.0"
+
+; Make sure that fast-isel folds the immediate into the binop even though it
+; is non-canonical.
+define i32 @test1(i32 %i) nounwind ssp {
+ %and = and i32 8, %i
+ ret i32 %and
+}
+
+; CHECK: test1:
+; CHECK: andl $8,
+
+
+; rdar://9289512 - The load should fold into the compare.
+define void @test2(i64 %x) nounwind ssp {
+entry:
+ %x.addr = alloca i64, align 8
+ store i64 %x, i64* %x.addr, align 8
+ %tmp = load i64* %x.addr, align 8
+ %cmp = icmp sgt i64 %tmp, 42
+ br i1 %cmp, label %if.then, label %if.end
+
+if.then: ; preds = %entry
+ br label %if.end
+
+if.end: ; preds = %if.then, %entry
+ ret void
+; CHECK: test2:
+; CHECK: movq %rdi, -8(%rsp)
+; CHECK: cmpq $42, -8(%rsp)
+}
+
+
+
+
+@G = external global i32
+define i64 @test3() nounwind {
+ %A = ptrtoint i32* @G to i64
+ ret i64 %A
+; CHECK: test3:
+; CHECK: movq _G@GOTPCREL(%rip), %rax
+; CHECK-NEXT: ret
+}
+
+
+
+; rdar://9289558
+@rtx_length = external global [153 x i8]
+
+define i32 @test4(i64 %idxprom9) nounwind {
+ %arrayidx10 = getelementptr inbounds [153 x i8]* @rtx_length, i32 0, i64 %idxprom9
+ %tmp11 = load i8* %arrayidx10, align 1
+ %conv = zext i8 %tmp11 to i32
+ ret i32 %conv
+
+; CHECK: test4:
+; CHECK: movq _rtx_length@GOTPCREL(%rip), %rax
+; CHECK-NEXT: movzbl (%rax,%rdi), %eax
+; CHECK-NEXT: ret
+}
+
+
+; PR3242 - Out of range shifts should not be folded by fastisel.
+define void @test5(i32 %x, i32* %p) nounwind {
+ %y = ashr i32 %x, 50000
+ store i32 %y, i32* %p
+ ret void
+
+; CHECK: test5:
+; CHECK: movl $50000, %ecx
+; CHECK: sarl %cl, %edi
+; CHECK: ret
+}
+
+; rdar://9289501 - fast isel should fold trivial multiplies to shifts.
+define i64 @test6(i64 %x) nounwind ssp {
+entry:
+ %mul = mul nsw i64 %x, 8
+ ret i64 %mul
+
+; CHECK: test6:
+; CHECK: leaq (,%rdi,8), %rax
+}
+
+define i32 @test7(i32 %x) nounwind ssp {
+entry:
+ %mul = mul nsw i32 %x, 8
+ ret i32 %mul
+; CHECK: test7:
+; CHECK: leal (,%rdi,8), %eax
+}
+
+
+; rdar://9289507 - folding of immediates into 64-bit operations.
+define i64 @test8(i64 %x) nounwind ssp {
+entry:
+ %add = add nsw i64 %x, 7
+ ret i64 %add
+
+; CHECK: test8:
+; CHECK: addq $7, %rdi
+}
+
+define i64 @test9(i64 %x) nounwind ssp {
+entry:
+ %add = mul nsw i64 %x, 7
+ ret i64 %add
+; CHECK: test9:
+; CHECK: imulq $7, %rdi, %rax
+}
+
+; rdar://9297011 - Don't reject udiv by a power of 2.
+define i32 @test10(i32 %X) nounwind {
+ %Y = udiv i32 %X, 8
+ ret i32 %Y
+; CHECK: test10:
+; CHECK: shrl $3,
+}
+
+define i32 @test11(i32 %X) nounwind {
+ %Y = sdiv exact i32 %X, 8
+ ret i32 %Y
+; CHECK: test11:
+; CHECK: sarl $3,
+}
+
+
+; rdar://9297006 - Trunc to bool.
+define void @test12(i8 %tmp) nounwind ssp noredzone {
+entry:
+ %tobool = trunc i8 %tmp to i1
+ br i1 %tobool, label %if.then, label %if.end
+
+if.then: ; preds = %entry
+ call void @test12(i8 0) noredzone
+ br label %if.end
+
+if.end: ; preds = %if.then, %entry
+ ret void
+; CHECK: test12:
+; CHECK: testb $1,
+; CHECK-NEXT: je L
+; CHECK-NEXT: movl $0, %edi
+; CHECK-NEXT: callq
+}
+
+declare void @test13f(i1 %X)
+
+define void @test13() nounwind {
+ call void @test13f(i1 0)
+ ret void
+; CHECK: test13:
+; CHECK: movl $0, %edi
+; CHECK-NEXT: callq
+}
+
+
+
+; rdar://9297003 - fast isel bails out on all functions taking bools
+define void @test14(i8 %tmp) nounwind ssp noredzone {
+entry:
+ %tobool = trunc i8 %tmp to i1
+ call void @test13f(i1 zeroext %tobool) noredzone
+ ret void
+; CHECK: test14:
+; CHECK: andb $1,
+; CHECK: callq
+}
+
+declare void @llvm.memcpy.p0i8.p0i8.i64(i8*, i8*, i64, i32, i1)
+
+; rdar://9289488 - fast-isel shouldn't bail out on llvm.memcpy
+define void @test15(i8* %a, i8* %b) nounwind {
+ call void @llvm.memcpy.p0i8.p0i8.i64(i8* %a, i8* %b, i64 4, i32 4, i1 false)
+ ret void
+; CHECK: test15:
+; CHECK-NEXT: movl (%rsi), %eax
+; CHECK-NEXT: movl %eax, (%rdi)
+; CHECK-NEXT: ret
+}
+
+; Handling for varargs calls
+declare void @test16callee(...) nounwind
+define void @test16() nounwind {
+; CHECK: test16:
+; CHECK: movl $1, %edi
+; CHECK: movb $0, %al
+; CHECK: callq _test16callee
+ call void (...)* @test16callee(i32 1)
+ br label %block2
+
+block2:
+; CHECK: movabsq $1
+; CHECK: cvtsi2sdq {{.*}} %xmm0
+; CHECK: movb $1, %al
+; CHECK: callq _test16callee
+ call void (...)* @test16callee(double 1.000000e+00)
+ ret void
+}
+
+
+declare void @foo() unnamed_addr ssp align 2
+
+; Verify that we don't fold the load into the compare here. That would move it
+; w.r.t. the call.
+define i32 @test17(i32 *%P) ssp nounwind {
+entry:
+ %tmp = load i32* %P
+ %cmp = icmp ne i32 %tmp, 5
+ call void @foo()
+ br i1 %cmp, label %if.then, label %if.else
+
+if.then: ; preds = %entry
+ ret i32 1
+
+if.else: ; preds = %entry
+ ret i32 2
+; CHECK: test17:
+; CHECK: movl (%rdi), %eax
+; CHECK: callq _foo
+; CHECK: cmpl $5, %eax
+; CHECK-NEXT: je
+}
+
+; Check that 0.0 is materialized using pxor
+define void @test18(float* %p1) {
+ store float 0.0, float* %p1
+ ret void
+; CHECK: test18:
+; CHECK: pxor
+}
+define void @test19(double* %p1) {
+ store double 0.0, double* %p1
+ ret void
+; CHECK: test19:
+; CHECK: pxor
+}
+
+; Check that we fast-isel sret
+%struct.a = type { i64, i64, i64 }
+define void @test20() nounwind ssp {
+entry:
+ %tmp = alloca %struct.a, align 8
+ call void @test20sret(%struct.a* sret %tmp)
+ ret void
+; CHECK: test20:
+; CHECK: leaq (%rsp), %rdi
+; CHECK: callq _test20sret
+}
+declare void @test20sret(%struct.a* sret)
+
+; Check that -0.0 is not materialized using pxor
+define void @test21(double* %p1) {
+ store double -0.0, double* %p1
+ ret void
+; CHECK: test21:
+; CHECK-NOT: pxor
+; CHECK: movsd LCPI
+} \ No newline at end of file
diff --git a/test/CodeGen/X86/fast-isel-x86.ll b/test/CodeGen/X86/fast-isel-x86.ll
index 56aeb3a34364..19972f74b2ba 100644
--- a/test/CodeGen/X86/fast-isel-x86.ll
+++ b/test/CodeGen/X86/fast-isel-x86.ll
@@ -1,4 +1,4 @@
-; RUN: llc -march=x86 -relocation-model=pic < %s
+; RUN: llc -fast-isel -O0 -mtriple=i386-apple-darwin10 -relocation-model=pic < %s | FileCheck %s
; This should use flds to set the return value.
; CHECK: test0:
@@ -31,3 +31,18 @@ define i32 @test2() nounwind {
%t = load i32* @HHH
ret i32 %t
}
+
+; Check that we fast-isel sret, and handle the callee-pops behavior correctly.
+%struct.a = type { i64, i64, i64 }
+define void @test3() nounwind ssp {
+entry:
+ %tmp = alloca %struct.a, align 8
+ call void @test3sret(%struct.a* sret %tmp)
+ ret void
+; CHECK: test3:
+; CHECK: subl $44
+; CHECK: leal 16(%esp)
+; CHECK: calll _test3sret
+; CHECK: addl $40
+}
+declare void @test3sret(%struct.a* sret)
diff --git a/test/CodeGen/X86/fast-isel.ll b/test/CodeGen/X86/fast-isel.ll
index 177c06b45dcd..5a1d2136ce4a 100644
--- a/test/CodeGen/X86/fast-isel.ll
+++ b/test/CodeGen/X86/fast-isel.ll
@@ -20,6 +20,7 @@ fast:
%t6 = add i32 %t5, 2
%t7 = getelementptr i32* %y, i32 1
%t8 = getelementptr i32* %t7, i32 %t6
+ call void asm sideeffect "hello world", ""()
br label %exit
exit:
@@ -92,3 +93,13 @@ define void @load_store_i1(i1* %p, i1* %q) nounwind {
store i1 %t, i1* %q
ret void
}
+
+
+@crash_test1x = external global <2 x i32>, align 8
+
+define void @crash_test1() nounwind ssp {
+ %tmp = load <2 x i32>* @crash_test1x, align 8
+ %neg = xor <2 x i32> %tmp, <i32 -1, i32 -1>
+ ret void
+}
+
diff --git a/test/CodeGen/X86/fold-mul-lohi.ll b/test/CodeGen/X86/fold-mul-lohi.ll
index 0351ecab117b..5614c808d0e6 100644
--- a/test/CodeGen/X86/fold-mul-lohi.ll
+++ b/test/CodeGen/X86/fold-mul-lohi.ll
@@ -1,5 +1,6 @@
-; RUN: llc < %s -march=x86 | not grep lea
-; RUN: llc < %s -march=x86-64 | not grep lea
+; RUN: llc < %s -march=x86 | FileCheck %s
+; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s
+; CHECK-NOT: lea
@B = external global [1000 x i8], align 32
@A = external global [1000 x i8], align 32
diff --git a/test/CodeGen/X86/fold-pcmpeqd-0.ll b/test/CodeGen/X86/fold-pcmpeqd-0.ll
index e5be58e1aaa3..647bbdb7f0fd 100644
--- a/test/CodeGen/X86/fold-pcmpeqd-0.ll
+++ b/test/CodeGen/X86/fold-pcmpeqd-0.ll
@@ -1,11 +1,21 @@
-; RUN: llc < %s -mtriple=i386-apple-darwin -mcpu=yonah | not grep pcmpeqd
-; RUN: llc < %s -mtriple=i386-apple-darwin -mcpu=yonah | grep orps | grep CPI0_2 | count 2
-; RUN: llc < %s -mtriple=x86_64-apple-darwin | grep pcmpeqd | count 1
+; RUN: llc < %s -mtriple=i386-apple-darwin -mcpu=yonah -regalloc=linearscan | FileCheck --check-prefix=I386 %s
+; RUN: llc < %s -mtriple=x86_64-apple-darwin | FileCheck --check-prefix=X86-64 %s
; This testcase shouldn't need to spill the -1 value,
; so it should just use pcmpeqd to materialize an all-ones vector.
; For i386, cp load of -1 are folded.
+; With -regalloc=greedy, the live range is split before spilling, so the first
+; pcmpeq doesn't get folded as a constant pool load.
+
+; I386-NOT: pcmpeqd
+; I386: orps LCPI0_2, %xmm
+; I386-NOT: pcmpeqd
+; I386: orps LCPI0_2, %xmm
+
+; X86-64: pcmpeqd
+; X86-64-NOT: pcmpeqd
+
%struct.__ImageExecInfo = type <{ <4 x i32>, <4 x float>, <2 x i64>, i8*, i8*, i8*, i32, i32, i32, i32, i32 }>
%struct._cl_image_format_t = type <{ i32, i32, i32 }>
%struct._image2d_t = type <{ i8*, %struct._cl_image_format_t, i32, i32, i32, i32, i32, i32 }>
diff --git a/test/CodeGen/X86/fold-pcmpeqd-2.ll b/test/CodeGen/X86/fold-pcmpeqd-2.ll
index 49f879504e06..9f8d9903810d 100644
--- a/test/CodeGen/X86/fold-pcmpeqd-2.ll
+++ b/test/CodeGen/X86/fold-pcmpeqd-2.ll
@@ -1,10 +1,20 @@
-; RUN: llc < %s -mtriple=i386-apple-darwin -mcpu=yonah | not grep pcmpeqd
-; RUN: llc < %s -mtriple=x86_64-apple-darwin | grep pcmpeqd | count 1
+; RUN: llc < %s -mtriple=i386-apple-darwin -mcpu=yonah -regalloc=linearscan | FileCheck %s
+; RUN: llc < %s -mtriple=x86_64-apple-darwin -regalloc=linearscan | FileCheck %s
-; This testcase should need to spill the -1 value on x86-32,
+; This testcase should need to spill the -1 value on both x86-32 and x86-64,
; so it shouldn't use pcmpeqd to materialize an all-ones vector; it
; should use a constant-pool load instead.
+; Constant pool all-ones vector:
+; CHECK: .long 4294967295
+; CHECK-NEXT: .long 4294967295
+; CHECK-NEXT: .long 4294967295
+; CHECK-NEXT: .long 4294967295
+
+; No pcmpeqd instructions, everybody uses the constant pool.
+; CHECK: program_1:
+; CHECK-NOT: pcmpeqd
+
%struct.__ImageExecInfo = type <{ <4 x i32>, <4 x float>, <2 x i64>, i8*, i8*, i8*, i32, i32, i32, i32, i32 }>
%struct._cl_image_format_t = type <{ i32, i32, i32 }>
%struct._image2d_t = type <{ i8*, %struct._cl_image_format_t, i32, i32, i32, i32, i32, i32 }>
@@ -57,6 +67,7 @@ forbody: ; preds = %forcond
%bitcast11.i6 = bitcast <4 x float> %tmp83 to <4 x i32> ; <<4 x i32>> [#uses=1]
%not.i7 = xor <4 x i32> zeroinitializer, < i32 -1, i32 -1, i32 -1, i32 -1 > ; <<4 x i32>> [#uses=1]
%andnps.i8 = and <4 x i32> %bitcast11.i6, %not.i7 ; <<4 x i32>> [#uses=1]
+ call void null(<4 x float> %mul313, <4 x float> %cmpunord.i11, <4 x float> %tmp83, <4 x float> zeroinitializer, %struct.__ImageExecInfo* null, <4 x i32> zeroinitializer) nounwind
%orps.i9 = or <4 x i32> %andnps.i8, %andps.i5 ; <<4 x i32>> [#uses=1]
%bitcast17.i10 = bitcast <4 x i32> %orps.i9 to <4 x float> ; <<4 x float>> [#uses=1]
%tmp84 = call <4 x float> @llvm.x86.sse.min.ps(<4 x float> %mul313, <4 x float> zeroinitializer) nounwind ; <<4 x float>> [#uses=1]
diff --git a/test/CodeGen/X86/fold-zext-trunc.ll b/test/CodeGen/X86/fold-zext-trunc.ll
new file mode 100644
index 000000000000..f901ad280b50
--- /dev/null
+++ b/test/CodeGen/X86/fold-zext-trunc.ll
@@ -0,0 +1,23 @@
+; RUN: llc < %s | FileCheck %s
+; PR9055
+target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32"
+target triple = "i686-pc-linux-gnu"
+
+%struct.S0 = type { i32, [2 x i8], [2 x i8], [4 x i8] }
+
+@g_98 = common global %struct.S0 zeroinitializer, align 4
+
+define void @foo() nounwind {
+; CHECK: movzbl
+; CHECK-NOT: movzbl
+; CHECK: calll
+entry:
+ %tmp17 = load i8* getelementptr inbounds (%struct.S0* @g_98, i32 0, i32 1, i32 0), align 4
+ %tmp54 = zext i8 %tmp17 to i32
+ %foo = load i32* bitcast (i8* getelementptr inbounds (%struct.S0* @g_98, i32 0, i32 1, i32 0) to i32*), align 4
+ %conv.i = trunc i32 %foo to i8
+ tail call void @func_12(i32 %tmp54, i8 zeroext %conv.i) nounwind
+ ret void
+}
+
+declare void @func_12(i32, i8 zeroext)
diff --git a/test/CodeGen/X86/fp-stack-compare.ll b/test/CodeGen/X86/fp-stack-compare.ll
index b216914d2391..f3998b67f672 100644
--- a/test/CodeGen/X86/fp-stack-compare.ll
+++ b/test/CodeGen/X86/fp-stack-compare.ll
@@ -1,11 +1,11 @@
-; RUN: llc < %s -march=x86 -mcpu=i386 | grep {fucompi.*st.\[12\]}
+; RUN: llc < %s -march=x86 -mcpu=i386 | FileCheck %s
; PR1012
define float @foo(float* %col.2.0) {
- %tmp = load float* %col.2.0 ; <float> [#uses=3]
- %tmp16 = fcmp olt float %tmp, 0.000000e+00 ; <i1> [#uses=1]
- %tmp20 = fsub float -0.000000e+00, %tmp ; <float> [#uses=1]
- %iftmp.2.0 = select i1 %tmp16, float %tmp20, float %tmp ; <float> [#uses=1]
- ret float %iftmp.2.0
+; CHECK: fucompi
+ %tmp = load float* %col.2.0
+ %tmp16 = fcmp olt float %tmp, 0.000000e+00
+ %tmp20 = fsub float -0.000000e+00, %tmp
+ %iftmp.2.0 = select i1 %tmp16, float %tmp20, float %tmp
+ ret float %iftmp.2.0
}
-
diff --git a/test/CodeGen/X86/fp-trunc.ll b/test/CodeGen/X86/fp-trunc.ll
new file mode 100644
index 000000000000..170637a40ee2
--- /dev/null
+++ b/test/CodeGen/X86/fp-trunc.ll
@@ -0,0 +1,35 @@
+; RUN: llc < %s -march=x86 -mattr=+sse2,-avx | FileCheck %s
+
+define <1 x float> @test1(<1 x double> %x) nounwind {
+; CHECK: cvtsd2ss
+; CHECK: ret
+ %y = fptrunc <1 x double> %x to <1 x float>
+ ret <1 x float> %y
+}
+
+
+define <2 x float> @test2(<2 x double> %x) nounwind {
+; FIXME: It would be nice if this compiled down to a cvtpd2ps
+; CHECK: cvtsd2ss
+; CHECK: cvtsd2ss
+; CHECK: ret
+ %y = fptrunc <2 x double> %x to <2 x float>
+ ret <2 x float> %y
+}
+
+define <8 x float> @test3(<8 x double> %x) nounwind {
+; FIXME: It would be nice if this compiled down to a series of cvtpd2ps
+; CHECK: cvtsd2ss
+; CHECK: cvtsd2ss
+; CHECK: cvtsd2ss
+; CHECK: cvtsd2ss
+; CHECK: cvtsd2ss
+; CHECK: cvtsd2ss
+; CHECK: cvtsd2ss
+; CHECK: cvtsd2ss
+; CHECK: ret
+ %y = fptrunc <8 x double> %x to <8 x float>
+ ret <8 x float> %y
+}
+
+
diff --git a/test/CodeGen/X86/global-sections-tls.ll b/test/CodeGen/X86/global-sections-tls.ll
index 2c2303042bc4..d5409a579b2f 100644
--- a/test/CodeGen/X86/global-sections-tls.ll
+++ b/test/CodeGen/X86/global-sections-tls.ll
@@ -2,7 +2,7 @@
; PR4639
@G1 = internal thread_local global i32 0 ; <i32*> [#uses=1]
-; LINUX: .section .tbss,"awT",@nobits
+; LINUX: .section .tbss,"awT",@nobits
; LINUX: G1:
diff --git a/test/CodeGen/X86/global-sections.ll b/test/CodeGen/X86/global-sections.ll
index 39a69e17a100..d0a1b4d281fe 100644
--- a/test/CodeGen/X86/global-sections.ll
+++ b/test/CodeGen/X86/global-sections.ll
@@ -99,7 +99,7 @@
; DARWIN: _G7:
; DARWIN: .asciz "abcdefghi"
-; LINUX: .section .rodata.str1.1,"aMS",@progbits,1
+; LINUX: .section .rodata.str1.1,"aMS",@progbits,1
; LINUX: .globl G7
; LINUX: G7:
; LINUX: .asciz "abcdefghi"
@@ -114,7 +114,7 @@
; DARWIN: .globl _G8
; DARWIN: _G8:
-; LINUX: .section .rodata.str2.2,"aMS",@progbits,2
+; LINUX: .section .rodata.str2.2,"aMS",@progbits,2
; LINUX: .globl G8
; LINUX:G8:
@@ -123,7 +123,7 @@
; DARWIN: .globl _G9
; DARWIN: _G9:
-; LINUX: .section .rodata.str4.4,"aMS",@progbits,4
+; LINUX: .section .rodata.str4.4,"aMS",@progbits,4
; LINUX: .globl G9
; LINUX:G9
diff --git a/test/CodeGen/X86/h-register-store.ll b/test/CodeGen/X86/h-register-store.ll
index d30e6b334e8b..0adb2b148c39 100644
--- a/test/CodeGen/X86/h-register-store.ll
+++ b/test/CodeGen/X86/h-register-store.ll
@@ -1,9 +1,29 @@
-; RUN: llc < %s -march=x86-64 > %t
-; RUN: grep mov %t | count 6
-; RUN: grep {movb %ah, (%rsi)} %t | count 3
-; RUN: llc < %s -march=x86 > %t
-; RUN: grep mov %t | count 3
-; RUN: grep {movb %ah, (%e} %t | count 3
+; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s -check-prefix=X64
+; X64: mov
+; X64-NEXT: movb %ah, (%rsi)
+; X64: mov
+; X64-NEXT: movb %ah, (%rsi)
+; X64: mov
+; X64-NEXT: movb %ah, (%rsi)
+; X64-NOT: mov
+
+; RUN: llc < %s -mtriple=x86_64-win32 | FileCheck %s -check-prefix=W64
+; W64-NOT: mov
+; W64: movb %ch, (%rdx)
+; W64-NOT: mov
+; W64: movb %ch, (%rdx)
+; W64-NOT: mov
+; W64: movb %ch, (%rdx)
+; W64-NOT: mov
+
+; RUN: llc < %s -march=x86 | FileCheck %s -check-prefix=X32
+; X32-NOT: mov
+; X32: movb %ah, (%e
+; X32-NOT: mov
+; X32: movb %ah, (%e
+; X32-NOT: mov
+; X32: movb %ah, (%e
+; X32-NOT: mov
; Use h-register extract and store.
diff --git a/test/CodeGen/X86/h-registers-0.ll b/test/CodeGen/X86/h-registers-0.ll
index e84bb9a34a26..cdc75af92e43 100644
--- a/test/CodeGen/X86/h-registers-0.ll
+++ b/test/CodeGen/X86/h-registers-0.ll
@@ -1,4 +1,5 @@
-; RUN: llc < %s -march=x86-64 | FileCheck %s -check-prefix=X86-64
+; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s -check-prefix=X86-64
+; RUN: llc < %s -mtriple=x86_64-win32 | FileCheck %s -check-prefix=WIN64
; RUN: llc < %s -march=x86 | FileCheck %s -check-prefix=X86-32
; Use h registers. On x86-64, codegen doesn't support general allocation
@@ -9,6 +10,12 @@ define void @bar64(i64 inreg %x, i8* inreg %p) nounwind {
; X86-64: shrq $8, %rdi
; X86-64: incb %dil
+; See FIXME: on regclass GR8.
+; It could be optimally transformed like; incb %ch; movb %ch, (%rdx)
+; WIN64: bar64:
+; WIN64: shrq $8, %rcx
+; WIN64: incb %cl
+
; X86-32: bar64:
; X86-32: incb %ah
%t0 = lshr i64 %x, 8
@@ -23,6 +30,10 @@ define void @bar32(i32 inreg %x, i8* inreg %p) nounwind {
; X86-64: shrl $8, %edi
; X86-64: incb %dil
+; WIN64: bar32:
+; WIN64: shrl $8, %ecx
+; WIN64: incb %cl
+
; X86-32: bar32:
; X86-32: incb %ah
%t0 = lshr i32 %x, 8
@@ -37,6 +48,10 @@ define void @bar16(i16 inreg %x, i8* inreg %p) nounwind {
; X86-64: shrl $8, %edi
; X86-64: incb %dil
+; WIN64: bar16:
+; WIN64: shrl $8, %ecx
+; WIN64: incb %cl
+
; X86-32: bar16:
; X86-32: incb %ah
%t0 = lshr i16 %x, 8
@@ -51,6 +66,9 @@ define i64 @qux64(i64 inreg %x) nounwind {
; X86-64: movq %rdi, %rax
; X86-64: movzbl %ah, %eax
+; WIN64: qux64:
+; WIN64: movzbl %ch, %eax
+
; X86-32: qux64:
; X86-32: movzbl %ah, %eax
%t0 = lshr i64 %x, 8
@@ -63,6 +81,9 @@ define i32 @qux32(i32 inreg %x) nounwind {
; X86-64: movl %edi, %eax
; X86-64: movzbl %ah, %eax
+; WIN64: qux32:
+; WIN64: movzbl %ch, %eax
+
; X86-32: qux32:
; X86-32: movzbl %ah, %eax
%t0 = lshr i32 %x, 8
@@ -75,6 +96,9 @@ define i16 @qux16(i16 inreg %x) nounwind {
; X86-64: movl %edi, %eax
; X86-64: movzbl %ah, %eax
+; WIN64: qux16:
+; WIN64: movzbl %ch, %eax
+
; X86-32: qux16:
; X86-32: movzbl %ah, %eax
%t0 = lshr i16 %x, 8
diff --git a/test/CodeGen/X86/h-registers-1.ll b/test/CodeGen/X86/h-registers-1.ll
index e97ebab69712..402cdfe413b5 100644
--- a/test/CodeGen/X86/h-registers-1.ll
+++ b/test/CodeGen/X86/h-registers-1.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -march=x86-64 > %t
+; RUN: llc < %s -mtriple=x86_64-linux > %t
; RUN: grep {movzbl %\[abcd\]h,} %t | count 8
; RUN: grep {%\[abcd\]h} %t | not grep {%r\[\[:digit:\]\]*d}
diff --git a/test/CodeGen/X86/hidden-vis-pic.ll b/test/CodeGen/X86/hidden-vis-pic.ll
index ba130a2c1c86..217dba6944b4 100644
--- a/test/CodeGen/X86/hidden-vis-pic.ll
+++ b/test/CodeGen/X86/hidden-vis-pic.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -mtriple=i386-apple-darwin9 -relocation-model=pic -disable-fp-elim -unwind-tables | FileCheck %s
+; RUN: llc < %s -disable-cfi -mtriple=i386-apple-darwin9 -relocation-model=pic -disable-fp-elim -unwind-tables | FileCheck %s
diff --git a/test/CodeGen/X86/i64-mem-copy.ll b/test/CodeGen/X86/i64-mem-copy.ll
index 847e2095f4c5..dce12ae12485 100644
--- a/test/CodeGen/X86/i64-mem-copy.ll
+++ b/test/CodeGen/X86/i64-mem-copy.ll
@@ -1,5 +1,9 @@
-; RUN: llc < %s -march=x86-64 | grep {movq.*(%rsi), %rax}
-; RUN: llc < %s -march=x86 -mattr=+sse2 | grep {movsd.*(%eax),}
+; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s -check-prefix=X64
+; RUN: llc < %s -mtriple=x86_64-win32 | FileCheck %s -check-prefix=X64
+; X64: movq ({{%rsi|%rdx}}), %r
+
+; RUN: llc < %s -march=x86 -mattr=+sse2 | FileCheck %s -check-prefix=X32
+; X32: movsd (%eax), %xmm
; Uses movsd to load / store i64 values if sse2 is available.
diff --git a/test/CodeGen/X86/iabs.ll b/test/CodeGen/X86/iabs.ll
index 6a79ee879253..a8ba0155fd10 100644
--- a/test/CodeGen/X86/iabs.ll
+++ b/test/CodeGen/X86/iabs.ll
@@ -1,12 +1,11 @@
; RUN: llc < %s -march=x86-64 -stats |& \
-; RUN: grep {6 .*Number of machine instrs printed}
+; RUN: grep {5 .*Number of machine instrs printed}
;; Integer absolute value, should produce something at least as good as:
-;; movl %edi, %eax
-;; sarl $31, %eax
-;; addl %eax, %edi
-;; xorl %eax, %edi
-;; movl %edi, %eax
+;; movl %edi, %ecx
+;; sarl $31, %ecx
+;; leal (%rdi,%rcx), %eax
+;; xorl %ecx, %eax
;; ret
define i32 @test(i32 %a) nounwind {
%tmp1neg = sub i32 0, %a
diff --git a/test/CodeGen/X86/isel-sink3.ll b/test/CodeGen/X86/isel-sink3.ll
index 8d3d97a930be..7012ccefaadb 100644
--- a/test/CodeGen/X86/isel-sink3.ll
+++ b/test/CodeGen/X86/isel-sink3.ll
@@ -1,9 +1,11 @@
-; RUN: llc < %s | grep {addl.\$4, %ecx}
-; RUN: llc < %s | not grep leal
+; RUN: llc < %s | FileCheck %s
; this should not sink %1 into bb1, that would increase reg pressure.
; rdar://6399178
+; CHECK: addl $4,
+; CHECK-NOT: leal
+
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
target triple = "i386-apple-darwin7"
diff --git a/test/CodeGen/X86/lea-3.ll b/test/CodeGen/X86/lea-3.ll
index 44413d60785e..c439ee1d06e3 100644
--- a/test/CodeGen/X86/lea-3.ll
+++ b/test/CodeGen/X86/lea-3.ll
@@ -1,17 +1,20 @@
-; RUN: llc < %s -march=x86-64 | grep {leal (%rdi,%rdi,2), %eax}
-define i32 @test(i32 %a) {
- %tmp2 = mul i32 %a, 3 ; <i32> [#uses=1]
- ret i32 %tmp2
-}
+; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s
+; RUN: llc < %s -mtriple=x86_64-win32 | FileCheck %s
-; RUN: llc < %s -march=x86-64 | grep {leaq (,%rdi,4), %rax}
+; CHECK: leaq (,[[A0:%rdi|%rcx]],4), %rax
define i64 @test2(i64 %a) {
%tmp2 = shl i64 %a, 2
%tmp3 = or i64 %tmp2, %a
ret i64 %tmp3
}
-;; TODO! LEA instead of shift + copy.
+; CHECK: leal ([[A0]],[[A0]],2), %eax
+define i32 @test(i32 %a) {
+ %tmp2 = mul i32 %a, 3 ; <i32> [#uses=1]
+ ret i32 %tmp2
+}
+
+; CHECK: leaq (,[[A0]],8), %rax
define i64 @test3(i64 %a) {
%tmp2 = shl i64 %a, 3
ret i64 %tmp2
diff --git a/test/CodeGen/X86/lock-inst-encoding.ll b/test/CodeGen/X86/lock-inst-encoding.ll
index 03468e2b3f4f..2d10fbc611d0 100644
--- a/test/CodeGen/X86/lock-inst-encoding.ll
+++ b/test/CodeGen/X86/lock-inst-encoding.ll
@@ -4,10 +4,9 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3
target triple = "x86_64-apple-darwin10.0.0"
; CHECK: f0:
-; CHECK: addq %rax, (%rdi)
-; CHECK: # encoding: [0xf0,0x48,0x01,0x07]
+; CHECK: addq %{{.*}}, ({{.*}}){{.*}}encoding: [0xf0,
; CHECK: ret
-define void @f0(i64* %a0) {
+define void @f0(i64* %a0) nounwind {
%t0 = and i64 1, 1
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 true) nounwind
%1 = call i64 @llvm.atomic.load.add.i64.p0i64(i64* %a0, i64 %t0) nounwind
diff --git a/test/CodeGen/X86/loop-strength-reduce4.ll b/test/CodeGen/X86/loop-strength-reduce4.ll
index 6556fdeea834..32e78790abdb 100644
--- a/test/CodeGen/X86/loop-strength-reduce4.ll
+++ b/test/CodeGen/X86/loop-strength-reduce4.ll
@@ -4,10 +4,10 @@
; By starting the IV at -64 instead of 0, a cmp is eliminated,
; as the flags from the add can be used directly.
-; STATIC: movl $-64, %ecx
+; STATIC: movl $-64, [[ECX:%e..]]
-; STATIC: movl %eax, _state+76(%ecx)
-; STATIC: addl $16, %ecx
+; STATIC: movl [[EAX:%e..]], _state+76([[ECX]])
+; STATIC: addl $16, [[ECX]]
; STATIC: jne
; In PIC mode the symbol can't be folded, so the change-compare-stride
diff --git a/test/CodeGen/X86/lsr-interesting-step.ll b/test/CodeGen/X86/lsr-interesting-step.ll
index 4b7050bd507b..d1de0510a046 100644
--- a/test/CodeGen/X86/lsr-interesting-step.ll
+++ b/test/CodeGen/X86/lsr-interesting-step.ll
@@ -1,9 +1,9 @@
-; RUN: llc < %s -march=x86-64 -relocation-model=static -mtriple=x86_64-unknown-linux-gnu
+; RUN: llc < %s -march=x86-64 -relocation-model=static -mtriple=x86_64-unknown-linux-gnu -asm-verbose=0 | FileCheck %s
; The inner loop should require only one add (and no leas either).
; rdar://8100380
-; CHECK: BB0_4:
+; CHECK: BB0_3:
; CHECK-NEXT: movb $0, flags(%rdx)
; CHECK-NEXT: addq %rcx, %rdx
; CHECK-NEXT: cmpq $8192, %rdx
diff --git a/test/CodeGen/X86/lsr-quadratic-expand.ll b/test/CodeGen/X86/lsr-quadratic-expand.ll
new file mode 100644
index 000000000000..2bbb47092904
--- /dev/null
+++ b/test/CodeGen/X86/lsr-quadratic-expand.ll
@@ -0,0 +1,22 @@
+; RUN: llc -march=x86-64 < %s
+
+define void @dw2102_i2c_transfer() nounwind {
+entry:
+ br label %bb
+
+bb: ; preds = %bb, %entry
+ %z = phi i64 [ 0, %entry ], [ %z3, %bb ]
+ %z1 = phi i16 [ undef, %entry ], [ %z6, %bb ]
+ %z2 = phi i32 [ 0, %entry ], [ %z8, %bb ]
+ %z3 = add i64 %z, 1
+ %z4 = zext i16 %z1 to i32
+ %z5 = add nsw i32 %z4, %z2
+ %z6 = trunc i32 %z5 to i16
+ call fastcc void @dw210x_op_rw(i16 zeroext %z6)
+ %z7 = getelementptr i8* null, i64 %z
+ store i8 undef, i8* %z7, align 1
+ %z8 = add nsw i32 %z2, 1
+ br label %bb
+}
+
+declare fastcc void @dw210x_op_rw(i16 zeroext) nounwind
diff --git a/test/CodeGen/X86/lsr-redundant-addressing.ll b/test/CodeGen/X86/lsr-redundant-addressing.ll
new file mode 100644
index 000000000000..aaa1426918f2
--- /dev/null
+++ b/test/CodeGen/X86/lsr-redundant-addressing.ll
@@ -0,0 +1,45 @@
+; RUN: llc -march=x86-64 < %s | fgrep {addq $-16,} | count 1
+; rdar://9081094
+
+; LSR shouldn't create lots of redundant address computations.
+
+%0 = type { i32, [3 x i32] }
+%1 = type { i32 (i32, i32, i32)*, i32, i32, [3 x i32], i8*, i8*, i8* }
+
+@pgm = external hidden unnamed_addr global [5 x %0], align 32
+@isa = external hidden unnamed_addr constant [13 x %1], align 32
+
+define void @main_bb.i() nounwind {
+bb:
+ br label %bb38
+
+bb38: ; preds = %bb200, %bb
+ %tmp39 = phi i64 [ %tmp201, %bb200 ], [ 0, %bb ]
+ %tmp40 = sub i64 0, %tmp39
+ %tmp47 = getelementptr [5 x %0]* @pgm, i64 0, i64 %tmp40, i32 0
+ %tmp34 = load i32* %tmp47, align 16
+ %tmp203 = icmp slt i32 %tmp34, 12
+ br i1 %tmp203, label %bb215, label %bb200
+
+bb200: ; preds = %bb38
+ %tmp201 = add i64 %tmp39, 1
+ br label %bb38
+
+bb215: ; preds = %bb38
+ %tmp50 = getelementptr [5 x %0]* @pgm, i64 0, i64 %tmp40, i32 1, i64 2
+ %tmp49 = getelementptr [5 x %0]* @pgm, i64 0, i64 %tmp40, i32 1, i64 1
+ %tmp48 = getelementptr [5 x %0]* @pgm, i64 0, i64 %tmp40, i32 1, i64 0
+ %tmp216 = add nsw i32 %tmp34, 1
+ store i32 %tmp216, i32* %tmp47, align 16
+ %tmp217 = sext i32 %tmp216 to i64
+ %tmp218 = getelementptr inbounds [13 x %1]* @isa, i64 0, i64 %tmp217, i32 3, i64 0
+ %tmp219 = load i32* %tmp218, align 8
+ store i32 %tmp219, i32* %tmp48, align 4
+ %tmp220 = getelementptr inbounds [13 x %1]* @isa, i64 0, i64 %tmp217, i32 3, i64 1
+ %tmp221 = load i32* %tmp220, align 4
+ store i32 %tmp221, i32* %tmp49, align 4
+ %tmp222 = getelementptr inbounds [13 x %1]* @isa, i64 0, i64 %tmp217, i32 3, i64 2
+ %tmp223 = load i32* %tmp222, align 8
+ store i32 %tmp223, i32* %tmp50, align 4
+ ret void
+}
diff --git a/test/CodeGen/X86/lsr-reuse-trunc.ll b/test/CodeGen/X86/lsr-reuse-trunc.ll
index 29f03d68dade..47705190b0f4 100644
--- a/test/CodeGen/X86/lsr-reuse-trunc.ll
+++ b/test/CodeGen/X86/lsr-reuse-trunc.ll
@@ -4,8 +4,9 @@
; Full strength reduction wouldn't reduce register pressure, so LSR should
; stick with indexing here.
-; CHECK: movaps (%{{rsi|rdx}},%rax,4), %xmm3
-; CHECK: movaps %xmm3, (%{{rdi|rcx}},%rax,4)
+; CHECK: movaps (%{{rsi|rdx}},%rax,4), [[X3:%xmm[0-9]+]]
+; CHECK: movaps
+; CHECK: [[X3]], (%{{rdi|rcx}},%rax,4)
; CHECK: addq $4, %rax
; CHECK: cmpl %eax, (%{{rdx|r8}})
; CHECK-NEXT: jg
diff --git a/test/CodeGen/X86/lsr-reuse.ll b/test/CodeGen/X86/lsr-reuse.ll
index 2a9762928329..527a5a60e868 100644
--- a/test/CodeGen/X86/lsr-reuse.ll
+++ b/test/CodeGen/X86/lsr-reuse.ll
@@ -1,3 +1,4 @@
+; XFAIL: *
; RUN: llc < %s -march=x86-64 -O3 -asm-verbose=false | FileCheck %s
target datalayout = "e-p:64:64:64"
target triple = "x86_64-unknown-unknown"
diff --git a/test/CodeGen/X86/machine-cse.ll b/test/CodeGen/X86/machine-cse.ll
index e284776ed02d..d819fc8f6ecd 100644
--- a/test/CodeGen/X86/machine-cse.ll
+++ b/test/CodeGen/X86/machine-cse.ll
@@ -6,11 +6,11 @@
%struct.s2 = type { i32, i8*, i8*, [256 x %struct.s1*], [8 x i32], i64, i8*, i32, i64, i64, i32, %struct.s3*, %struct.s3*, [49 x i64] }
%struct.s3 = type { %struct.s3*, %struct.s3*, i32, i32, i32 }
-define fastcc i8* @t(i64 %size) nounwind {
+define fastcc i8* @t(i32 %base) nounwind {
entry:
; CHECK: t:
; CHECK: leaq (%rax,%rax,4)
- %0 = zext i32 undef to i64
+ %0 = zext i32 %base to i64
%1 = getelementptr inbounds %struct.s2* null, i64 %0
br i1 undef, label %bb1, label %bb2
diff --git a/test/CodeGen/X86/mcinst-lowering-cmp0.ll b/test/CodeGen/X86/mcinst-lowering-cmp0.ll
deleted file mode 100644
index 756be1fabfda..000000000000
--- a/test/CodeGen/X86/mcinst-lowering-cmp0.ll
+++ /dev/null
@@ -1,68 +0,0 @@
-; RUN: llc --show-mc-encoding -relocation-model=pic -disable-fp-elim -O3 < %s | FileCheck %s
-
-target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128-n8:16:32"
-target triple = "i386-apple-darwin10.0.0"
-
-%struct.NSConstantString = type { i32*, i32, i8*, i32 }
-%struct._objc_module = type { i32, i32, i8*, %struct._objc_symtab* }
-%struct._objc_symtab = type { i32, i8*, i16, i16, [0 x i8*] }
-
-@"\01L_OBJC_IMAGE_INFO" = internal constant [2 x i32] [i32 0, i32 16], section "__OBJC, __image_info,regular" ; <[2 x i32]*> [#uses=1]
-@"\01L_OBJC_METH_VAR_NAME_" = internal global [4 x i8] c"foo\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[4 x i8]*> [#uses=1]
-@"\01L_OBJC_SELECTOR_REFERENCES_" = internal global i8* getelementptr inbounds ([4 x i8]* @"\01L_OBJC_METH_VAR_NAME_", i32 0, i32 0), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; <i8**> [#uses=3]
-@__CFConstantStringClassReference = external global [0 x i32] ; <[0 x i32]*> [#uses=1]
-@.str = private constant [3 x i8] c"||\00" ; <[3 x i8]*> [#uses=1]
-@_unnamed_cfstring_ = private constant %struct.NSConstantString { i32* getelementptr inbounds ([0 x i32]* @__CFConstantStringClassReference, i32 0, i32 0), i32 1992, i8* getelementptr inbounds ([3 x i8]* @.str, i32 0, i32 0), i32 2 }, section "__DATA,__cfstring" ; <%struct.NSConstantString*> [#uses=1]
-@"\01L_OBJC_METH_VAR_NAME_1" = internal global [5 x i8] c"baz:\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[5 x i8]*> [#uses=1]
-@"\01L_OBJC_SELECTOR_REFERENCES_2" = internal global i8* getelementptr inbounds ([5 x i8]* @"\01L_OBJC_METH_VAR_NAME_1", i32 0, i32 0), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; <i8**> [#uses=2]
-@"\01L_OBJC_METH_VAR_NAME_3" = internal global [4 x i8] c"bar\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[4 x i8]*> [#uses=1]
-@"\01L_OBJC_SELECTOR_REFERENCES_4" = internal global i8* getelementptr inbounds ([4 x i8]* @"\01L_OBJC_METH_VAR_NAME_3", i32 0, i32 0), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; <i8**> [#uses=2]
-@"\01L_OBJC_CLASS_NAME_" = internal global [1 x i8] zeroinitializer, section "__TEXT,__cstring,cstring_literals", align 1 ; <[1 x i8]*> [#uses=1]
-@"\01L_OBJC_MODULES" = internal global %struct._objc_module { i32 7, i32 16, i8* getelementptr inbounds ([1 x i8]* @"\01L_OBJC_CLASS_NAME_", i32 0, i32 0), %struct._objc_symtab* null }, section "__OBJC,__module_info,regular,no_dead_strip", align 4 ; <%struct._objc_module*> [#uses=1]
-@llvm.used = appending global [9 x i8*] [i8* bitcast ([2 x i32]* @"\01L_OBJC_IMAGE_INFO" to i8*), i8* getelementptr inbounds ([4 x i8]* @"\01L_OBJC_METH_VAR_NAME_", i32 0, i32 0), i8* bitcast (i8** @"\01L_OBJC_SELECTOR_REFERENCES_" to i8*), i8* getelementptr inbounds ([5 x i8]* @"\01L_OBJC_METH_VAR_NAME_1", i32 0, i32 0), i8* bitcast (i8** @"\01L_OBJC_SELECTOR_REFERENCES_2" to i8*), i8* getelementptr inbounds ([4 x i8]* @"\01L_OBJC_METH_VAR_NAME_3", i32 0, i32 0), i8* bitcast (i8** @"\01L_OBJC_SELECTOR_REFERENCES_4" to i8*), i8* getelementptr inbounds ([1 x i8]* @"\01L_OBJC_CLASS_NAME_", i32 0, i32 0), i8* bitcast (%struct._objc_module* @"\01L_OBJC_MODULES" to i8*)], section "llvm.metadata" ; <[9 x i8*]*> [#uses=0]
-
-define void @f0(i8* nocapture %a, i8* nocapture %b) nounwind optsize ssp {
-entry:
- %call = tail call i32 (...)* @get_name() nounwind optsize ; <i32> [#uses=2]
- %conv = inttoptr i32 %call to i8* ; <i8*> [#uses=1]
- %call1 = tail call i32 (...)* @get_dict() nounwind optsize ; <i32> [#uses=2]
- %conv2 = inttoptr i32 %call1 to i8* ; <i8*> [#uses=2]
-
-; Check that we lower to the short form of cmpl, which has an 8-bit immediate.
-;
-; CHECK: cmpl $0, -16(%ebp) ## 4-byte Folded Reload
-; CHECK: ## encoding: [0x83,0x7d,0xf0,0x00]
-; rdar://7999130
- %cmp = icmp eq i32 %call1, 0 ; <i1> [#uses=1]
- br i1 %cmp, label %if.end, label %if.then
-
-if.then: ; preds = %entry
- %tmp5 = load i8** @"\01L_OBJC_SELECTOR_REFERENCES_" ; <i8*> [#uses=1]
- %call6 = tail call i8* (i8*, i8*, ...)* @objc_msgSend(i8* %conv2, i8* %tmp5) nounwind optsize ; <i8*> [#uses=1]
- %tmp7 = load i8** @"\01L_OBJC_SELECTOR_REFERENCES_2" ; <i8*> [#uses=1]
- %call820 = tail call i8* (i8*, i8*, ...)* @objc_msgSend(i8* %call6, i8* %tmp7, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring_ to i8*)) nounwind optsize ; <i8*> [#uses=0]
- br label %if.end
-
-if.end: ; preds = %entry, %if.then
- %tmp10 = load i8** @"\01L_OBJC_SELECTOR_REFERENCES_" ; <i8*> [#uses=1]
- %call11 = tail call i8* (i8*, i8*, ...)* @objc_msgSend(i8* %conv2, i8* %tmp10) nounwind optsize ; <i8*> [#uses=1]
- %tmp12 = load i8** @"\01L_OBJC_SELECTOR_REFERENCES_4" ; <i8*> [#uses=1]
- %call13 = tail call i8* (i8*, i8*, ...)* @objc_msgSend(i8* %call11, i8* %tmp12) nounwind optsize ; <i8*> [#uses=0]
- %cmp15 = icmp eq i32 %call, 0 ; <i1> [#uses=1]
- br i1 %cmp15, label %if.end19, label %if.then17
-
-if.then17: ; preds = %if.end
- tail call void (...)* @f1(i8* %conv) nounwind optsize
- ret void
-
-if.end19: ; preds = %if.end
- ret void
-}
-
-declare i32 @get_name(...) optsize
-
-declare i32 @get_dict(...) optsize
-
-declare i8* @objc_msgSend(i8*, i8*, ...)
-
-declare void @f1(...) optsize
diff --git a/test/CodeGen/X86/mmx-copy-gprs.ll b/test/CodeGen/X86/mmx-copy-gprs.ll
index 3607043e94fc..377875565bf8 100644
--- a/test/CodeGen/X86/mmx-copy-gprs.ll
+++ b/test/CodeGen/X86/mmx-copy-gprs.ll
@@ -1,10 +1,12 @@
-; RUN: llc < %s -march=x86-64 | grep {movq.*(%rsi), %rax}
-; RUN: llc < %s -march=x86 -mattr=-sse2 | grep {movl.*4(%eax),}
-; RUN: llc < %s -march=x86 -mattr=+sse2 | grep {movsd.(%eax),}
+; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s
+; RUN: llc < %s -mtriple=x86_64-win32 | FileCheck %s
+; RUN: llc < %s -march=x86 -mattr=-sse2 | FileCheck %s
+; RUN: llc < %s -march=x86 -mattr=+sse2 | FileCheck %s
; This test should use GPRs to copy the mmx value, not MMX regs. Using mmx regs,
; increases the places that need to use emms.
-
+; CHECK-NOT: %mm
+; CHECK-NOT: emms
; rdar://5741668
define void @foo(<1 x i64>* %x, <1 x i64>* %y) nounwind {
diff --git a/test/CodeGen/X86/narrow-shl-cst.ll b/test/CodeGen/X86/narrow-shl-cst.ll
new file mode 100644
index 000000000000..a404f34b9caa
--- /dev/null
+++ b/test/CodeGen/X86/narrow-shl-cst.ll
@@ -0,0 +1,101 @@
+; RUN: llc < %s -march=x86-64 | FileCheck %s
+; PR5039
+
+define i32 @test1(i32 %x) nounwind {
+ %and = shl i32 %x, 10
+ %shl = and i32 %and, 31744
+ ret i32 %shl
+; CHECK: test1:
+; CHECK: andl $31
+; CHECK: shll $10
+}
+
+define i32 @test2(i32 %x) nounwind {
+ %or = shl i32 %x, 10
+ %shl = or i32 %or, 31744
+ ret i32 %shl
+; CHECK: test2:
+; CHECK: orl $31
+; CHECK: shll $10
+}
+
+define i32 @test3(i32 %x) nounwind {
+ %xor = shl i32 %x, 10
+ %shl = xor i32 %xor, 31744
+ ret i32 %shl
+; CHECK: test3:
+; CHECK: xorl $31
+; CHECK: shll $10
+}
+
+define i64 @test4(i64 %x) nounwind {
+ %and = shl i64 %x, 40
+ %shl = and i64 %and, 264982302294016
+ ret i64 %shl
+; CHECK: test4:
+; CHECK: andq $241
+; CHECK: shlq $40
+}
+
+define i64 @test5(i64 %x) nounwind {
+ %and = shl i64 %x, 40
+ %shl = and i64 %and, 34084860461056
+ ret i64 %shl
+; CHECK: test5:
+; CHECK: andq $31
+; CHECK: shlq $40
+}
+
+define i64 @test6(i64 %x) nounwind {
+ %and = shl i64 %x, 32
+ %shl = and i64 %and, -281474976710656
+ ret i64 %shl
+; CHECK: test6:
+; CHECK: andq $-65536
+; CHECK: shlq $32
+}
+
+define i64 @test7(i64 %x) nounwind {
+ %or = shl i64 %x, 40
+ %shl = or i64 %or, 264982302294016
+ ret i64 %shl
+; CHECK: test7:
+; CHECK: orq $241
+; CHECK: shlq $40
+}
+
+define i64 @test8(i64 %x) nounwind {
+ %or = shl i64 %x, 40
+ %shl = or i64 %or, 34084860461056
+ ret i64 %shl
+; CHECK: test8:
+; CHECK: orq $31
+; CHECK: shlq $40
+}
+
+define i64 @test9(i64 %x) nounwind {
+ %xor = shl i64 %x, 40
+ %shl = xor i64 %xor, 264982302294016
+ ret i64 %shl
+; CHECK: test9:
+; CHECK: orq $241
+; CHECK: shlq $40
+}
+
+define i64 @test10(i64 %x) nounwind {
+ %xor = shl i64 %x, 40
+ %shl = xor i64 %xor, 34084860461056
+ ret i64 %shl
+; CHECK: test10:
+; CHECK: xorq $31
+; CHECK: shlq $40
+}
+
+define i64 @test11(i64 %x) nounwind {
+ %xor = shl i64 %x, 33
+ %shl = xor i64 %xor, -562949953421312
+ ret i64 %shl
+; CHECK: test11:
+; CHECK: xorq $-65536
+; CHECK: shlq $33
+}
diff --git a/test/CodeGen/X86/no-cfi.ll b/test/CodeGen/X86/no-cfi.ll
new file mode 100644
index 000000000000..f9985d458512
--- /dev/null
+++ b/test/CodeGen/X86/no-cfi.ll
@@ -0,0 +1,38 @@
+; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -disable-cfi | FileCheck --check-prefix=STATIC %s
+; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -disable-cfi -relocation-model=pic | FileCheck --check-prefix=PIC %s
+
+; STATIC: .ascii "zPLR"
+; STATIC: .byte 3
+; STATIC-NEXT: .long __gxx_personality_v0
+; STATIC-NEXT: .byte 3
+; STATIC-NEXT: .byte 3
+
+; PIC: .ascii "zPLR"
+; PIC: .byte 155
+; PIC-NEXT: .L
+; PIC-NEXT: .long DW.ref.__gxx_personality_v0-.L
+; PIC-NEXT: .byte 27
+; PIC-NEXT: .byte 27
+
+
+define void @bar() {
+entry:
+ %call = invoke i32 @foo()
+ to label %invoke.cont unwind label %lpad
+
+invoke.cont:
+ ret void
+
+lpad:
+ %exn = call i8* @llvm.eh.exception() nounwind
+ %eh.selector = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %exn, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i8* null) nounwind
+ ret void
+}
+
+declare i32 @foo()
+
+declare i8* @llvm.eh.exception() nounwind readonly
+
+declare i32 @__gxx_personality_v0(...)
+
+declare i32 @llvm.eh.selector(i8*, i8*, ...) nounwind
diff --git a/test/CodeGen/X86/optimize-max-3.ll b/test/CodeGen/X86/optimize-max-3.ll
index b90413d40a0f..e35eb7036723 100644
--- a/test/CodeGen/X86/optimize-max-3.ll
+++ b/test/CodeGen/X86/optimize-max-3.ll
@@ -45,8 +45,8 @@ for.end: ; preds = %for.body, %entry
; CHECK-NEXT: align
; CHECK-NEXT: BB1_2:
; CHECK-NEXT: callq
-; CHECK-NEXT: incl [[BX:%ebx|%esi]]
-; CHECK-NEXT: cmpl [[R14:%r14d|%edi]], [[BX]]
+; CHECK-NEXT: incl [[BX:%[a-z0-9]+]]
+; CHECK-NEXT: cmpl [[R14:%[a-z0-9]+]], [[BX]]
; CHECK-NEXT: movq %rax, %r{{di|cx}}
; CHECK-NEXT: jl
diff --git a/test/CodeGen/X86/or-address.ll b/test/CodeGen/X86/or-address.ll
index 6447680e623b..b3fc62736b38 100644
--- a/test/CodeGen/X86/or-address.ll
+++ b/test/CodeGen/X86/or-address.ll
@@ -4,10 +4,10 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3
target triple = "x86_64-apple-darwin10.3"
-; CHECK: movl %{{.*}}, (%rdi,%rdx,4)
-; CHECK: movl %{{.*}}, 8(%rdi,%rdx,4)
-; CHECK: movl %{{.*}}, 4(%rdi,%rdx,4)
-; CHECK: movl %{{.*}}, 12(%rdi,%rdx,4)
+; CHECK: movl %{{.*}}, (%rdi,[[R0:.+]],4)
+; CHECK: movl %{{.*}}, 8(%rdi,[[R0]],4)
+; CHECK: movl %{{.*}}, 4(%rdi,[[R0]],4)
+; CHECK: movl %{{.*}}, 12(%rdi,[[R0]],4)
define void @test(i32* nocapture %array, i32 %r0) nounwind ssp noredzone {
bb.nph:
diff --git a/test/CodeGen/X86/peep-vector-extract-concat.ll b/test/CodeGen/X86/peep-vector-extract-concat.ll
index e4ab2b5e05a4..606a9be68bd4 100644
--- a/test/CodeGen/X86/peep-vector-extract-concat.ll
+++ b/test/CodeGen/X86/peep-vector-extract-concat.ll
@@ -1,4 +1,9 @@
-; RUN: llc < %s -march=x86-64 -mattr=+sse2,-sse41 | grep {pshufd \$3, %xmm0, %xmm0}
+; RUN: llc < %s -mtriple=x86_64-linux -mattr=+sse2,-sse41 | FileCheck %s
+; CHECK: pshufd $3, %xmm0, %xmm0
+
+; RUN: llc < %s -mtriple=x86_64-win32 -mattr=+sse2,-sse41 | FileCheck %s -check-prefix=WIN64
+; %a is passed indirectly on Win64.
+; WIN64: movss 12(%rcx), %xmm0
define float @foo(<8 x float> %a) nounwind {
%c = extractelement <8 x float> %a, i32 3
diff --git a/test/CodeGen/X86/personality.ll b/test/CodeGen/X86/personality.ll
index 6789bb0c0fbe..e952a9bb25a4 100644
--- a/test/CodeGen/X86/personality.ll
+++ b/test/CodeGen/X86/personality.ll
@@ -1,5 +1,5 @@
-; RUN: llc < %s -mtriple=x86_64-apple-darwin9 | FileCheck %s -check-prefix=X64
-; RUN: llc < %s -mtriple=i386-apple-darwin9 | FileCheck %s -check-prefix=X32
+; RUN: llc < %s -disable-cfi -mtriple=x86_64-apple-darwin9 -disable-cgp-branch-opts | FileCheck %s -check-prefix=X64
+; RUN: llc < %s -disable-cfi -mtriple=i386-apple-darwin9 -disable-cgp-branch-opts | FileCheck %s -check-prefix=X32
; PR1632
define void @_Z1fv() {
@@ -38,13 +38,15 @@ declare void @__gxx_personality_v0()
declare void @__cxa_end_catch()
-; X64: Leh_frame_common_begin0:
-; X64: .long ___gxx_personality_v0@GOTPCREL+4
+; X64: zPLR
+; X64: .byte 155
+; X64-NEXT: .long ___gxx_personality_v0@GOTPCREL+4
-; X32: Leh_frame_common_begin0:
-; X32: .long L___gxx_personality_v0$non_lazy_ptr-
-; ....
+; X32: .section __IMPORT,__pointers,non_lazy_symbol_pointers
+; X32-NEXT: L___gxx_personality_v0$non_lazy_ptr:
+; X32-NEXT: .indirect_symbol ___gxx_personality_v0
-; X32: .section __IMPORT,__pointers,non_lazy_symbol_pointers
-; X32: L___gxx_personality_v0$non_lazy_ptr:
-; X32: .indirect_symbol ___gxx_personality_v0
+; X32: zPLR
+; X32: .byte 155
+; X32-NEXT: :
+; X32-NEXT: .long L___gxx_personality_v0$non_lazy_ptr-
diff --git a/test/CodeGen/X86/phi-constants.ll b/test/CodeGen/X86/phi-bit-propagation.ll
index da9652f73404..94c97229b092 100644
--- a/test/CodeGen/X86/phi-constants.ll
+++ b/test/CodeGen/X86/phi-bit-propagation.ll
@@ -33,3 +33,23 @@ return: ; preds = %for.body, %for.cond
%retval.0 = phi i1 [ true, %for.body ], [ false, %for.cond ]
ret i1 %retval.0
}
+
+; This test case caused an assertion failure; see PR9324.
+define void @func_37() noreturn nounwind ssp {
+entry:
+ br i1 undef, label %lbl_919, label %entry.for.inc_crit_edge
+
+entry.for.inc_crit_edge: ; preds = %entry
+ br label %for.inc
+
+lbl_919: ; preds = %for.cond7.preheader, %entry
+ br label %for.cond7.preheader
+
+for.cond7.preheader: ; preds = %for.inc, %lbl_919
+ %storemerge.ph = phi i8 [ 0, %lbl_919 ], [ %add, %for.inc ]
+ br i1 undef, label %for.inc, label %lbl_919
+
+for.inc: ; preds = %for.cond7.preheader, %entry.for.inc_crit_edge
+ %add = add i8 undef, 1
+ br label %for.cond7.preheader
+}
diff --git a/test/CodeGen/X86/pic.ll b/test/CodeGen/X86/pic.ll
index dc5fcd78dc84..fb60ac2a60b9 100644
--- a/test/CodeGen/X86/pic.ll
+++ b/test/CodeGen/X86/pic.ll
@@ -79,8 +79,8 @@ entry:
; LINUX-NEXT: .L3$pb:
; LINUX: popl
; LINUX: addl $_GLOBAL_OFFSET_TABLE_+(.L{{.*}}-.L3$pb), %[[REG3:e..]]
-; LINUX: movl pfoo@GOT(%[[REG3]]),
; LINUX: calll afoo@PLT
+; LINUX: movl pfoo@GOT(%[[REG3]]),
; LINUX: calll *
}
diff --git a/test/CodeGen/X86/pmulld.ll b/test/CodeGen/X86/pmulld.ll
index 3ef594112b45..be527aed9a98 100644
--- a/test/CodeGen/X86/pmulld.ll
+++ b/test/CodeGen/X86/pmulld.ll
@@ -1,8 +1,13 @@
-; RUN: llc < %s -march=x86-64 -mattr=+sse41 -asm-verbose=0 | FileCheck %s
+; RUN: llc < %s -mtriple=x86_64-linux -mattr=+sse41 -asm-verbose=0 | FileCheck %s
+; RUN: llc < %s -mtriple=x86_64-win32 -mattr=+sse41 -asm-verbose=0 | FileCheck %s -check-prefix=WIN64
define <4 x i32> @test1(<4 x i32> %A, <4 x i32> %B) nounwind {
; CHECK: test1:
; CHECK-NEXT: pmulld
+
+; WIN64: test1:
+; WIN64-NEXT: movdqa (%rcx), %xmm0
+; WIN64-NEXT: pmulld (%rdx), %xmm0
%C = mul <4 x i32> %A, %B
ret <4 x i32> %C
}
@@ -10,6 +15,11 @@ define <4 x i32> @test1(<4 x i32> %A, <4 x i32> %B) nounwind {
define <4 x i32> @test1a(<4 x i32> %A, <4 x i32> *%Bp) nounwind {
; CHECK: test1a:
; CHECK-NEXT: pmulld
+
+; WIN64: test1a:
+; WIN64-NEXT: movdqa (%rcx), %xmm0
+; WIN64-NEXT: pmulld (%rdx), %xmm0
+
%B = load <4 x i32>* %Bp
%C = mul <4 x i32> %A, %B
ret <4 x i32> %C
diff --git a/test/CodeGen/X86/postra-licm.ll b/test/CodeGen/X86/postra-licm.ll
index 902c69b471db..48c48aebe5be 100644
--- a/test/CodeGen/X86/postra-licm.ll
+++ b/test/CodeGen/X86/postra-licm.ll
@@ -2,6 +2,7 @@
; RUN: llc < %s -mtriple=x86_64-apple-darwin -relocation-model=pic -disable-fp-elim | FileCheck %s -check-prefix=X86-64
; MachineLICM should be able to hoist loop invariant reload out of the loop.
+; Only linear scan needs this, -regalloc=greedy sinks the spill instead.
; rdar://7233099
%struct.FILE = type { i8*, i32, i32, i16, i16, %struct.__sbuf, i32, i8*, i32 (i8*)*, i32 (i8*, i8*, i32)*, i64 (i8*, i64, i32)*, i32 (i8*, i8*, i32)*, %struct.__sbuf, %struct.__sFILEX*, i32, [3 x i8], [1 x i8], %struct.__sbuf, i32, i64 }
@@ -68,10 +69,12 @@ bb26.preheader: ; preds = %imix_test.exit
bb23: ; preds = %imix_test.exit
unreachable
+; Verify that there are no loads inside the loop.
; X86-32: %bb26.preheader
-; X86-32: movl -16(%ebp),
-; X86-32-NEXT: .align 4
-; X86-32-NEXT: %bb28
+; X86-32: .align 4
+; X86-32-NOT: (%esp),
+; X86-32-NOT: (%ebp),
+; X86-32: jmp
bb28: ; preds = %bb28, %bb26.preheader
%counter.035 = phi i32 [ %3, %bb28 ], [ 0, %bb26.preheader ] ; <i32> [#uses=2]
diff --git a/test/CodeGen/X86/pr2659.ll b/test/CodeGen/X86/pr2659.ll
index 54d043d54f83..ef0f9ea8b03a 100644
--- a/test/CodeGen/X86/pr2659.ll
+++ b/test/CodeGen/X86/pr2659.ll
@@ -18,7 +18,8 @@ forcond.preheader: ; preds = %entry
; CHECK: movl $1
; CHECK-NOT: xorl
; CHECK-NOT: movl
-; CHECK-NEXT: je
+; CHECK-NOT: LBB
+; CHECK: je
ifthen: ; preds = %entry
ret i32 0
diff --git a/test/CodeGen/X86/pr3366.ll b/test/CodeGen/X86/pr3366.ll
index f813e2e58801..1127b6093215 100644
--- a/test/CodeGen/X86/pr3366.ll
+++ b/test/CodeGen/X86/pr3366.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -march=x86 | grep movzbl
+; RUN: llc < %s -march=x86 -disable-cgp-branch-opts | grep movzbl
; PR3366
define void @_ada_c34002a() nounwind {
diff --git a/test/CodeGen/X86/pr3495-2.ll b/test/CodeGen/X86/pr3495-2.ll
index 98c064a07db9..a4204e528930 100644
--- a/test/CodeGen/X86/pr3495-2.ll
+++ b/test/CodeGen/X86/pr3495-2.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -march=x86 -relocation-model=pic -disable-fp-elim -stats |& grep {Number of loads added} | grep 1
+; RUN: llc < %s -march=x86 -relocation-model=pic -disable-fp-elim -stats -regalloc=linearscan |& grep {Number of loads added} | grep 1
; PR3495
;
; This test may not be testing what it was supposed to test.
diff --git a/test/CodeGen/X86/pr3495.ll b/test/CodeGen/X86/pr3495.ll
index e84a84f59bb7..c612a6ec8bbc 100644
--- a/test/CodeGen/X86/pr3495.ll
+++ b/test/CodeGen/X86/pr3495.ll
@@ -1,6 +1,6 @@
-; RUN: llc < %s -march=x86 -stats |& grep {Number of loads added} | grep 2
-; RUN: llc < %s -march=x86 -stats |& grep {Number of register spills} | grep 1
-; RUN: llc < %s -march=x86 -stats |& grep {Number of machine instrs printed} | grep 34
+; RUN: llc < %s -march=x86 -stats -regalloc=linearscan |& grep {Number of loads added} | grep 2
+; RUN: llc < %s -march=x86 -stats -regalloc=linearscan |& grep {Number of register spills} | grep 1
+; RUN: llc < %s -march=x86 -stats -regalloc=linearscan |& grep {Number of machine instrs printed} | grep 34
; PR3495
target triple = "i386-pc-linux-gnu"
diff --git a/test/CodeGen/X86/pr9743.ll b/test/CodeGen/X86/pr9743.ll
new file mode 100644
index 000000000000..8feccd9ef1c2
--- /dev/null
+++ b/test/CodeGen/X86/pr9743.ll
@@ -0,0 +1,17 @@
+; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -disable-fp-elim -asm-verbose=0 | FileCheck %s
+
+define void @f() {
+ ret void
+}
+
+; CHECK: .cfi_startproc
+; CHECK-NEXT: pushq
+; CHECK-NEXT: :
+; CHECK-NEXT: .cfi_def_cfa_offset 16
+; CHECK-NEXT: :
+; CHECK-NEXT: .cfi_offset 6, -16
+; CHECK-NEXT: movq %rsp, %rbp
+; CHECK-NEXT: :
+; CHECK-NEXT: .cfi_def_cfa_register 6
+; CHECK-NEXT: popq %rbp
+; CHECK-NEXT: ret
diff --git a/test/CodeGen/X86/pre-split1.ll b/test/CodeGen/X86/pre-split1.ll
index e89b507414eb..b55bf5710767 100644
--- a/test/CodeGen/X86/pre-split1.ll
+++ b/test/CodeGen/X86/pre-split1.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -march=x86 -mattr=+sse2 -pre-alloc-split -stats |& \
+; RUN: llc < %s -march=x86 -mattr=+sse2 -pre-alloc-split -regalloc=linearscan -stats |& \
; RUN: grep {pre-alloc-split} | grep {Number of intervals split} | grep 1
; XFAIL: *
diff --git a/test/CodeGen/X86/pre-split10.ll b/test/CodeGen/X86/pre-split10.ll
index db039bd97acd..83c6450c0ab9 100644
--- a/test/CodeGen/X86/pre-split10.ll
+++ b/test/CodeGen/X86/pre-split10.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -march=x86 -mattr=+sse2 -pre-alloc-split
+; RUN: llc < %s -march=x86 -mattr=+sse2 -pre-alloc-split -regalloc=linearscan
define i32 @main(i32 %argc, i8** %argv) nounwind {
entry:
diff --git a/test/CodeGen/X86/pre-split11.ll b/test/CodeGen/X86/pre-split11.ll
index 0a9f4e33f34c..3d549f9111ec 100644
--- a/test/CodeGen/X86/pre-split11.ll
+++ b/test/CodeGen/X86/pre-split11.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=+sse2 -pre-alloc-split | FileCheck %s
+; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=+sse2 -pre-alloc-split -regalloc=linearscan | FileCheck %s
@.str = private constant [28 x i8] c"\0A\0ADOUBLE D = %f\0A\00", align 1 ; <[28 x i8]*> [#uses=1]
@.str1 = private constant [37 x i8] c"double to long l1 = %ld\09\09(0x%lx)\0A\00", align 8 ; <[37 x i8]*> [#uses=1]
diff --git a/test/CodeGen/X86/pre-split2.ll b/test/CodeGen/X86/pre-split2.ll
index ba902f95513d..670737b72df1 100644
--- a/test/CodeGen/X86/pre-split2.ll
+++ b/test/CodeGen/X86/pre-split2.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -march=x86 -mattr=+sse2 -pre-alloc-split -stats |& \
+; RUN: llc < %s -march=x86 -mattr=+sse2 -pre-alloc-split -stats -regalloc=linearscan |& \
; RUN: grep {pre-alloc-split} | count 2
define i32 @t(i32 %arg) {
diff --git a/test/CodeGen/X86/pre-split3.ll b/test/CodeGen/X86/pre-split3.ll
index 2e314207c3e3..0c49a913353c 100644
--- a/test/CodeGen/X86/pre-split3.ll
+++ b/test/CodeGen/X86/pre-split3.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -march=x86 -mattr=+sse2 -pre-alloc-split -stats |& \
+; RUN: llc < %s -march=x86 -mattr=+sse2 -pre-alloc-split -regalloc=linearscan -stats |& \
; RUN: grep {pre-alloc-split} | grep {Number of intervals split} | grep 1
define i32 @t(i32 %arg) {
diff --git a/test/CodeGen/X86/pre-split4.ll b/test/CodeGen/X86/pre-split4.ll
index 10cef276c62f..37d1ac6301f0 100644
--- a/test/CodeGen/X86/pre-split4.ll
+++ b/test/CodeGen/X86/pre-split4.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -march=x86 -mattr=+sse2 -pre-alloc-split -stats |& \
+; RUN: llc < %s -march=x86 -mattr=+sse2 -pre-alloc-split -regalloc=linearscan -stats |& \
; RUN: grep {pre-alloc-split} | grep {Number of intervals split} | grep 2
define i32 @main(i32 %argc, i8** %argv) nounwind {
diff --git a/test/CodeGen/X86/pre-split5.ll b/test/CodeGen/X86/pre-split5.ll
index 8def460809f2..9f41f24c73e5 100644
--- a/test/CodeGen/X86/pre-split5.ll
+++ b/test/CodeGen/X86/pre-split5.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -march=x86 -mattr=+sse2 -pre-alloc-split
+; RUN: llc < %s -march=x86 -mattr=+sse2 -pre-alloc-split -regalloc=linearscan
target triple = "i386-apple-darwin9.5"
%struct.FILE = type { i8*, i32, i32, i16, i16, %struct.__sbuf, i32, i8*, i32 (i8*)*, i32 (i8*, i8*, i32)*, i64 (i8*, i64, i32)*, i32 (i8*, i8*, i32)*, %struct.__sbuf, %struct.__sFILEX*, i32, [3 x i8], [1 x i8], %struct.__sbuf, i32, i64 }
diff --git a/test/CodeGen/X86/pre-split6.ll b/test/CodeGen/X86/pre-split6.ll
index 837e238b6208..d8f274db2c9a 100644
--- a/test/CodeGen/X86/pre-split6.ll
+++ b/test/CodeGen/X86/pre-split6.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -mtriple=i386-apple-darwin -mattr=+sse2 -pre-alloc-split | grep {divsd 24} | count 1
+; RUN: llc < %s -mtriple=i386-apple-darwin -mattr=+sse2 -pre-alloc-split -regalloc=linearscan | grep {divsd 24} | count 1
@current_surfaces.b = external global i1 ; <i1*> [#uses=1]
diff --git a/test/CodeGen/X86/pre-split7.ll b/test/CodeGen/X86/pre-split7.ll
index 0b81c0bc09fe..8c93faac677c 100644
--- a/test/CodeGen/X86/pre-split7.ll
+++ b/test/CodeGen/X86/pre-split7.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -march=x86 -mattr=+sse2 -pre-alloc-split
+; RUN: llc < %s -march=x86 -mattr=+sse2 -pre-alloc-split -regalloc=linearscan
@object_distance = external global double, align 8 ; <double*> [#uses=1]
@axis_slope_angle = external global double, align 8 ; <double*> [#uses=1]
diff --git a/test/CodeGen/X86/pre-split8.ll b/test/CodeGen/X86/pre-split8.ll
index 0684bd036ce2..7e6ad6e17695 100644
--- a/test/CodeGen/X86/pre-split8.ll
+++ b/test/CodeGen/X86/pre-split8.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -march=x86 -mattr=+sse2 -pre-alloc-split -stats |& \
+; RUN: llc < %s -march=x86 -mattr=+sse2 -pre-alloc-split -regalloc=linearscan -stats |& \
; RUN: grep {pre-alloc-split} | grep {Number of intervals split} | grep 1
@current_surfaces.b = external global i1 ; <i1*> [#uses=1]
diff --git a/test/CodeGen/X86/pre-split9.ll b/test/CodeGen/X86/pre-split9.ll
index 86dda33533f7..951e6fb28a11 100644
--- a/test/CodeGen/X86/pre-split9.ll
+++ b/test/CodeGen/X86/pre-split9.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -march=x86 -mattr=+sse2 -pre-alloc-split -stats |& \
+; RUN: llc < %s -march=x86 -mattr=+sse2 -pre-alloc-split -regalloc=linearscan -stats |& \
; RUN: grep {pre-alloc-split} | grep {Number of intervals split} | grep 1
@current_surfaces.b = external global i1 ; <i1*> [#uses=1]
diff --git a/test/CodeGen/X86/remat-scalar-zero.ll b/test/CodeGen/X86/remat-scalar-zero.ll
index 2da96aba5531..f6f0ed10b514 100644
--- a/test/CodeGen/X86/remat-scalar-zero.ll
+++ b/test/CodeGen/X86/remat-scalar-zero.ll
@@ -1,3 +1,4 @@
+; XFAIL: *
; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu > %t
; RUN: not grep xor %t
; RUN: not grep movap %t
diff --git a/test/CodeGen/X86/scalar-min-max-fill-operand.ll b/test/CodeGen/X86/scalar-min-max-fill-operand.ll
index fe40758d8ecd..2f90932c0ed8 100644
--- a/test/CodeGen/X86/scalar-min-max-fill-operand.ll
+++ b/test/CodeGen/X86/scalar-min-max-fill-operand.ll
@@ -1,6 +1,13 @@
-; RUN: llc < %s -march=x86-64 | grep min | count 1
-; RUN: llc < %s -march=x86-64 | grep max | count 1
-; RUN: llc < %s -march=x86-64 | grep mov | count 2
+; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s
+; CHECK-NOT: {{(min|max|mov)}}
+; CHECK: mov
+; CHECK-NOT: {{(min|max|mov)}}
+; CHECK: min
+; CHECK-NOT: {{(min|max|mov)}}
+; CHECK: mov
+; CHECK-NOT: {{(min|max|mov)}}
+; CHECK: max
+; CHECK-NOT: {{(min|max|mov)}}
declare float @bar()
diff --git a/test/CodeGen/X86/sext-i1.ll b/test/CodeGen/X86/sext-i1.ll
index 21c418d534e9..574769b43084 100644
--- a/test/CodeGen/X86/sext-i1.ll
+++ b/test/CodeGen/X86/sext-i1.ll
@@ -1,5 +1,5 @@
-; RUN: llc < %s -march=x86 | FileCheck %s -check-prefix=32
-; RUN: llc < %s -march=x86-64 | FileCheck %s -check-prefix=64
+; RUN: llc < %s -march=x86 -disable-cgp-branch-opts | FileCheck %s -check-prefix=32
+; RUN: llc < %s -march=x86-64 -disable-cgp-branch-opts | FileCheck %s -check-prefix=64
; rdar://7573216
; PR6146
diff --git a/test/CodeGen/X86/shrink-compare.ll b/test/CodeGen/X86/shrink-compare.ll
new file mode 100644
index 000000000000..8d4b07f9d9b0
--- /dev/null
+++ b/test/CodeGen/X86/shrink-compare.ll
@@ -0,0 +1,36 @@
+; RUN: llc < %s -march=x86-64 | FileCheck %s
+
+declare void @bar()
+
+define void @test1(i32* nocapture %X) nounwind {
+entry:
+ %tmp1 = load i32* %X, align 4
+ %and = and i32 %tmp1, 255
+ %cmp = icmp eq i32 %and, 47
+ br i1 %cmp, label %if.then, label %if.end
+
+if.then:
+ tail call void @bar() nounwind
+ br label %if.end
+
+if.end:
+ ret void
+; CHECK: test1:
+; CHECK: cmpb $47, (%{{rdi|rcx}})
+}
+
+define void @test2(i32 %X) nounwind {
+entry:
+ %and = and i32 %X, 255
+ %cmp = icmp eq i32 %and, 47
+ br i1 %cmp, label %if.then, label %if.end
+
+if.then:
+ tail call void @bar() nounwind
+ br label %if.end
+
+if.end:
+ ret void
+; CHECK: test2:
+; CHECK: cmpb $47, %{{dil|cl}}
+}
diff --git a/test/CodeGen/X86/sse-align-0.ll b/test/CodeGen/X86/sse-align-0.ll
index b12a87d614d2..8ffd31247702 100644
--- a/test/CodeGen/X86/sse-align-0.ll
+++ b/test/CodeGen/X86/sse-align-0.ll
@@ -1,4 +1,5 @@
-; RUN: llc < %s -march=x86-64 | not grep mov
+; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s
+; CHECK-NOT: mov
define <4 x float> @foo(<4 x float>* %p, <4 x float> %x) nounwind {
%t = load <4 x float>* %p
diff --git a/test/CodeGen/X86/sse-align-3.ll b/test/CodeGen/X86/sse-align-3.ll
index c42f7f0bad99..04f216176c36 100644
--- a/test/CodeGen/X86/sse-align-3.ll
+++ b/test/CodeGen/X86/sse-align-3.ll
@@ -1,4 +1,9 @@
-; RUN: llc < %s -march=x86-64 | grep movap | count 2
+; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s
+; CHECK-NOT: movapd
+; CHECK: movaps
+; CHECK-NOT: movaps
+; CHECK: movapd
+; CHECK-NOT: movap
define void @foo(<4 x float>* %p, <4 x float> %x) nounwind {
store <4 x float> %x, <4 x float>* %p
diff --git a/test/CodeGen/X86/sse-align-7.ll b/test/CodeGen/X86/sse-align-7.ll
index 5784481c5ae9..e55d5859560e 100644
--- a/test/CodeGen/X86/sse-align-7.ll
+++ b/test/CodeGen/X86/sse-align-7.ll
@@ -1,4 +1,6 @@
-; RUN: llc < %s -march=x86-64 | grep movaps | count 1
+; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s
+; CHECK: movaps
+; CHECK-NOT: movaps
define void @bar(<2 x i64>* %p, <2 x i64> %x) nounwind {
store <2 x i64> %x, <2 x i64>* %p
diff --git a/test/CodeGen/X86/sse-commute.ll b/test/CodeGen/X86/sse-commute.ll
index 38ed644e952b..336bf06e557d 100644
--- a/test/CodeGen/X86/sse-commute.ll
+++ b/test/CodeGen/X86/sse-commute.ll
@@ -1,4 +1,4 @@
-; RUN: llc -march=x86-64 < %s | FileCheck %s
+; RUN: llc -mtriple=x86_64-linux < %s | FileCheck %s
; Commute the comparison to avoid a move.
; PR7500.
diff --git a/test/CodeGen/X86/sse2.ll b/test/CodeGen/X86/sse2.ll
index 5c3e32f016a7..70e0a8a177e0 100644
--- a/test/CodeGen/X86/sse2.ll
+++ b/test/CodeGen/X86/sse2.ll
@@ -178,9 +178,9 @@ define <4 x float> @test14(<4 x float>* %x, <4 x float>* %y) nounwind {
%tmp27 = shufflevector <4 x float> %tmp9, <4 x float> %tmp21, <4 x i32> < i32 0, i32 1, i32 4, i32 5 > ; <<4 x float>> [#uses=1]
ret <4 x float> %tmp27
; CHECK: test14:
-; CHECK: addps %xmm1, %xmm0
-; CHECK: subps %xmm1, %xmm2
-; CHECK: movlhps %xmm2, %xmm0
+; CHECK: addps [[X1:%xmm[0-9]+]], [[X0:%xmm[0-9]+]]
+; CHECK: subps [[X1]], [[X2:%xmm[0-9]+]]
+; CHECK: movlhps [[X2]], [[X0]]
}
define <4 x float> @test15(<4 x float>* %x, <4 x float>* %y) nounwind {
diff --git a/test/CodeGen/X86/sse3.ll b/test/CodeGen/X86/sse3.ll
index 9a60091a0cf0..8e72f133420a 100644
--- a/test/CodeGen/X86/sse3.ll
+++ b/test/CodeGen/X86/sse3.ll
@@ -168,12 +168,12 @@ define internal void @t10() nounwind {
store <4 x i16> %6, <4 x i16>* @g2, align 8
ret void
; X64: t10:
-; X64: pextrw $4, %xmm0, %eax
-; X64: unpcklpd %xmm1, %xmm1
-; X64: pshuflw $8, %xmm1, %xmm1
-; X64: pinsrw $2, %eax, %xmm1
-; X64: pextrw $6, %xmm0, %eax
-; X64: pinsrw $3, %eax, %xmm1
+; X64: pextrw $4, [[X0:%xmm[0-9]+]], %eax
+; X64: unpcklpd [[X1:%xmm[0-9]+]]
+; X64: pshuflw $8, [[X1]], [[X1]]
+; X64: pinsrw $2, %eax, [[X1]]
+; X64: pextrw $6, [[X0]], %eax
+; X64: pinsrw $3, %eax, [[X1]]
}
diff --git a/test/CodeGen/X86/sse_reload_fold.ll b/test/CodeGen/X86/sse_reload_fold.ll
index dc3d6fe6797d..02399c499556 100644
--- a/test/CodeGen/X86/sse_reload_fold.ll
+++ b/test/CodeGen/X86/sse_reload_fold.ll
@@ -1,5 +1,6 @@
-; RUN: llc < %s -march=x86-64 -mattr=+64bit,+sse3 -print-failed-fuse-candidates |& \
-; RUN: grep fail | count 1
+; RUN: llc < %s -mtriple=x86_64-linux -mattr=+64bit,+sse3 -print-failed-fuse-candidates |& FileCheck %s
+; CHECK: fail
+; CHECK-NOT: fail
declare float @test_f(float %f)
declare double @test_d(double %f)
diff --git a/test/CodeGen/X86/stdarg.ll b/test/CodeGen/X86/stdarg.ll
index 9778fa138948..5728daf1ee1c 100644
--- a/test/CodeGen/X86/stdarg.ll
+++ b/test/CodeGen/X86/stdarg.ll
@@ -1,4 +1,5 @@
-; RUN: llc < %s -march=x86-64 | grep {testb \[%\]al, \[%\]al}
+; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s
+; CHECK: testb %al, %al
%struct.__va_list_tag = type { i32, i32, i8*, i8* }
diff --git a/test/CodeGen/X86/stride-nine-with-base-reg.ll b/test/CodeGen/X86/stride-nine-with-base-reg.ll
index f4847a31c81f..ddf059c675df 100644
--- a/test/CodeGen/X86/stride-nine-with-base-reg.ll
+++ b/test/CodeGen/X86/stride-nine-with-base-reg.ll
@@ -1,5 +1,6 @@
-; RUN: llc < %s -march=x86 -relocation-model=static | not grep lea
-; RUN: llc < %s -march=x86-64 | not grep lea
+; RUN: llc < %s -march=x86 -relocation-model=static | FileCheck %s
+; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s
+; CHECK-NOT: lea
; P should be sunk into the loop and folded into the address mode. There
; shouldn't be any lea instructions inside the loop.
diff --git a/test/CodeGen/X86/stride-reuse.ll b/test/CodeGen/X86/stride-reuse.ll
index 5cbd895250a6..1251a2400555 100644
--- a/test/CodeGen/X86/stride-reuse.ll
+++ b/test/CodeGen/X86/stride-reuse.ll
@@ -1,5 +1,6 @@
-; RUN: llc < %s -march=x86 | not grep lea
-; RUN: llc < %s -march=x86-64 | not grep lea
+; RUN: llc < %s -march=x86 | FileCheck %s
+; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s
+; CHECK-NOT: lea
@B = external global [1000 x float], align 32
@A = external global [1000 x float], align 32
diff --git a/test/CodeGen/X86/sub-with-overflow.ll b/test/CodeGen/X86/sub-with-overflow.ll
index 19f4079abb5f..4522e917d315 100644
--- a/test/CodeGen/X86/sub-with-overflow.ll
+++ b/test/CodeGen/X86/sub-with-overflow.ll
@@ -1,5 +1,4 @@
-; RUN: llc < %s -march=x86 | grep {jo} | count 1
-; RUN: llc < %s -march=x86 | grep {jb} | count 1
+; RUN: llc < %s -march=x86 | FileCheck %s
@ok = internal constant [4 x i8] c"%d\0A\00"
@no = internal constant [4 x i8] c"no\0A\00"
@@ -18,6 +17,10 @@ normal:
overflow:
%t2 = tail call i32 (i8*, ...)* @printf( i8* getelementptr ([4 x i8]* @no, i32 0, i32 0) ) nounwind
ret i1 false
+
+; CHECK: func1:
+; CHECK: subl 20(%esp)
+; CHECK-NEXT: jo
}
define i1 @func2(i32 %v1, i32 %v2) nounwind {
@@ -34,8 +37,23 @@ normal:
carry:
%t2 = tail call i32 (i8*, ...)* @printf( i8* getelementptr ([4 x i8]* @no, i32 0, i32 0) ) nounwind
ret i1 false
+
+; CHECK: func2:
+; CHECK: subl 20(%esp)
+; CHECK-NEXT: jb
}
declare i32 @printf(i8*, ...) nounwind
declare {i32, i1} @llvm.ssub.with.overflow.i32(i32, i32)
declare {i32, i1} @llvm.usub.with.overflow.i32(i32, i32)
+
+define i1 @func3(i32 %x) nounwind {
+entry:
+ %t = call {i32, i1} @llvm.ssub.with.overflow.i32(i32 %x, i32 1)
+ %obit = extractvalue {i32, i1} %t, 1
+ ret i1 %obit
+
+; CHECK: func3:
+; CHECK: decl
+; CHECK-NEXT: seto
+}
diff --git a/test/CodeGen/X86/tail-opts.ll b/test/CodeGen/X86/tail-opts.ll
index 9291695f4d65..77710ad56bae 100644
--- a/test/CodeGen/X86/tail-opts.ll
+++ b/test/CodeGen/X86/tail-opts.ll
@@ -109,15 +109,15 @@ altret:
; CHECK: dont_merge_oddly:
; CHECK-NOT: ret
-; CHECK: ucomiss %xmm1, %xmm2
+; CHECK: ucomiss %xmm{{[0-2]}}, %xmm{{[0-2]}}
; CHECK-NEXT: jbe .LBB2_3
-; CHECK-NEXT: ucomiss %xmm0, %xmm1
+; CHECK-NEXT: ucomiss %xmm{{[0-2]}}, %xmm{{[0-2]}}
; CHECK-NEXT: ja .LBB2_4
; CHECK-NEXT: .LBB2_2:
; CHECK-NEXT: movb $1, %al
; CHECK-NEXT: ret
; CHECK-NEXT: .LBB2_3:
-; CHECK-NEXT: ucomiss %xmm0, %xmm2
+; CHECK-NEXT: ucomiss %xmm{{[0-2]}}, %xmm{{[0-2]}}
; CHECK-NEXT: jbe .LBB2_2
; CHECK-NEXT: .LBB2_4:
; CHECK-NEXT: xorb %al, %al
@@ -153,16 +153,20 @@ bb30:
; an unconditional jump to complete a two-way conditional branch.
; CHECK: c_expand_expr_stmt:
-; CHECK: jmp .LBB3_11
-; CHECK-NEXT: .LBB3_9:
-; CHECK-NEXT: movq 8(%rax), %rax
-; CHECK-NEXT: xorb %dl, %dl
-; CHECK-NEXT: movb 16(%rax), %al
-; CHECK-NEXT: cmpb $16, %al
-; CHECK-NEXT: je .LBB3_11
-; CHECK-NEXT: cmpb $23, %al
-; CHECK-NEXT: jne .LBB3_14
-; CHECK-NEXT: .LBB3_11:
+;
+; This test only works when register allocation happens to use %rax for both
+; load addresses.
+;
+; CHE: jmp .LBB3_11
+; CHE-NEXT: .LBB3_9:
+; CHE-NEXT: movq 8(%rax), %rax
+; CHE-NEXT: xorb %dl, %dl
+; CHE-NEXT: movb 16(%rax), %al
+; CHE-NEXT: cmpb $16, %al
+; CHE-NEXT: je .LBB3_11
+; CHE-NEXT: cmpb $23, %al
+; CHE-NEXT: jne .LBB3_14
+; CHE-NEXT: .LBB3_11:
%0 = type { %struct.rtx_def* }
%struct.lang_decl = type opaque
diff --git a/test/CodeGen/X86/tailcall-returndup-void.ll b/test/CodeGen/X86/tailcall-returndup-void.ll
new file mode 100644
index 000000000000..c1d631225ec7
--- /dev/null
+++ b/test/CodeGen/X86/tailcall-returndup-void.ll
@@ -0,0 +1,37 @@
+; RUN: llc < %s -march=x86-64 | FileCheck %s
+; CHECK: rBM_info
+; CHECK-NOT: ret
+
+@sES_closure = external global [0 x i64]
+declare cc10 void @sEH_info(i64* noalias nocapture, i64* noalias nocapture, i64* noalias nocapture, i64, i64, i64) align 8
+
+define cc10 void @rBM_info(i64* noalias nocapture %Base_Arg, i64* noalias nocapture %Sp_Arg, i64* noalias nocapture %Hp_Arg, i64 %R1_Arg, i64 %R2_Arg, i64 %R3_Arg) nounwind align 8 {
+c263:
+ %ln265 = getelementptr inbounds i64* %Sp_Arg, i64 -2
+ %ln266 = ptrtoint i64* %ln265 to i64
+ %ln268 = icmp ult i64 %ln266, %R3_Arg
+ br i1 %ln268, label %c26a, label %n26p
+
+n26p: ; preds = %c263
+ br i1 icmp ne (i64 and (i64 ptrtoint ([0 x i64]* @sES_closure to i64), i64 7), i64 0), label %c1ZP.i, label %n1ZQ.i
+
+n1ZQ.i: ; preds = %n26p
+ %ln1ZT.i = load i64* getelementptr inbounds ([0 x i64]* @sES_closure, i64 0, i64 0), align 8
+ %ln1ZU.i = inttoptr i64 %ln1ZT.i to void (i64*, i64*, i64*, i64, i64, i64)*
+ tail call cc10 void %ln1ZU.i(i64* %Base_Arg, i64* %Sp_Arg, i64* %Hp_Arg, i64 ptrtoint ([0 x i64]* @sES_closure to i64), i64 ptrtoint ([0 x i64]* @sES_closure to i64), i64 %R3_Arg) nounwind
+ br label %rBL_info.exit
+
+c1ZP.i: ; preds = %n26p
+ tail call cc10 void @sEH_info(i64* %Base_Arg, i64* %Sp_Arg, i64* %Hp_Arg, i64 ptrtoint ([0 x i64]* @sES_closure to i64), i64 ptrtoint ([0 x i64]* @sES_closure to i64), i64 %R3_Arg) nounwind
+ br label %rBL_info.exit
+
+rBL_info.exit: ; preds = %c1ZP.i, %n1ZQ.i
+ ret void
+
+c26a: ; preds = %c263
+ %ln27h = getelementptr inbounds i64* %Base_Arg, i64 -2
+ %ln27j = load i64* %ln27h, align 8
+ %ln27k = inttoptr i64 %ln27j to void (i64*, i64*, i64*, i64, i64, i64)*
+ tail call cc10 void %ln27k(i64* %Base_Arg, i64* %Sp_Arg, i64* %Hp_Arg, i64 %R1_Arg, i64 %R2_Arg, i64 %R3_Arg) nounwind
+ ret void
+}
diff --git a/test/CodeGen/X86/tailcallbyval64.ll b/test/CodeGen/X86/tailcallbyval64.ll
index 7c685b85807e..1b1efe713c6e 100644
--- a/test/CodeGen/X86/tailcallbyval64.ll
+++ b/test/CodeGen/X86/tailcallbyval64.ll
@@ -1,15 +1,30 @@
-; RUN: llc < %s -march=x86-64 -tailcallopt | grep TAILCALL
+; RUN: llc < %s -mtriple=x86_64-linux -tailcallopt | FileCheck %s
+
+; FIXME: Win64 does not support byval.
+
+; Expect the entry point.
+; CHECK: tailcaller:
+
; Expect 2 rep;movs because of tail call byval lowering.
-; RUN: llc < %s -march=x86-64 -tailcallopt | grep rep | wc -l | grep 2
+; CHECK: rep;
+; CHECK: rep;
+
; A sequence of copyto/copyfrom virtual registers is used to deal with byval
; lowering appearing after moving arguments to registers. The following two
; checks verify that the register allocator changes those sequences to direct
; moves to argument register where it can (for registers that are not used in
; byval lowering - not rsi, not rdi, not rcx).
; Expect argument 4 to be moved directly to register edx.
-; RUN: llc < %s -march=x86-64 -tailcallopt | grep movl | grep {7} | grep edx
+; CHECK: movl $7, %edx
+
; Expect argument 6 to be moved directly to register r8.
-; RUN: llc < %s -march=x86-64 -tailcallopt | grep movl | grep {17} | grep r8
+; CHECK: movl $17, %r8d
+
+; Expect not call but jmp to @tailcallee.
+; CHECK: jmp tailcallee
+
+; Expect the trailer.
+; CHECK: .size tailcaller
%struct.s = type { i64, i64, i64, i64, i64, i64, i64, i64,
i64, i64, i64, i64, i64, i64, i64, i64,
@@ -25,5 +40,3 @@ entry:
%tmp4 = tail call fastcc i64 @tailcallee(%struct.s* %a byval, i64 %tmp3, i64 %b, i64 7, i64 13, i64 17)
ret i64 %tmp4
}
-
-
diff --git a/test/CodeGen/X86/tailcallstack64.ll b/test/CodeGen/X86/tailcallstack64.ll
index 0c732d56b6ca..060ce0f7aab4 100644
--- a/test/CodeGen/X86/tailcallstack64.ll
+++ b/test/CodeGen/X86/tailcallstack64.ll
@@ -2,19 +2,19 @@
; RUN: llc < %s -tailcallopt -mtriple=x86_64-win32 -post-RA-scheduler=true | FileCheck %s
; FIXME: Redundant unused stack allocation could be eliminated.
-; CHECK: subq ${{24|88}}, %rsp
+; CHECK: subq ${{24|72}}, %rsp
; Check that lowered arguments on the stack do not overwrite each other.
; Add %in1 %p1 to a different temporary register (%eax).
-; CHECK: movl [[A1:32|144]](%rsp), %eax
+; CHECK: movl [[A1:32|144]](%rsp), [[R1:%e..]]
; Move param %in1 to temp register (%r10d).
-; CHECK: movl [[A2:40|152]](%rsp), %r10d
+; CHECK: movl [[A2:40|152]](%rsp), [[R2:%[a-z0-9]+]]
; Add %in1 %p1 to a different temporary register (%eax).
-; CHECK: addl {{%edi|%ecx}}, %eax
+; CHECK: addl {{%edi|%ecx}}, [[R1]]
; Move param %in2 to stack.
-; CHECK: movl %r10d, [[A1]](%rsp)
+; CHECK: movl [[R2]], [[A1]](%rsp)
; Move result of addition to stack.
-; CHECK: movl %eax, [[A2]](%rsp)
+; CHECK: movl [[R1]], [[A2]](%rsp)
; Eventually, do a TAILCALL
; CHECK: TAILCALL
diff --git a/test/CodeGen/X86/test-nofold.ll b/test/CodeGen/X86/test-nofold.ll
index f1063dcabf4f..97db1b340e81 100644
--- a/test/CodeGen/X86/test-nofold.ll
+++ b/test/CodeGen/X86/test-nofold.ll
@@ -2,10 +2,10 @@
; rdar://5752025
; We want:
-; CHECK: movl 4(%esp), %ecx
-; CHECK-NEXT: andl $15, %ecx
-; CHECK-NEXT: movl $42, %eax
-; CHECK-NEXT: cmovel %ecx, %eax
+; CHECK: movl $42, %ecx
+; CHECK-NEXT: movl 4(%esp), %eax
+; CHECK-NEXT: andl $15, %eax
+; CHECK-NEXT: cmovnel %ecx, %eax
; CHECK-NEXT: ret
;
; We don't want:
diff --git a/test/CodeGen/X86/twoaddr-lea.ll b/test/CodeGen/X86/twoaddr-lea.ll
index ec16dfe172e3..a1d797feeac4 100644
--- a/test/CodeGen/X86/twoaddr-lea.ll
+++ b/test/CodeGen/X86/twoaddr-lea.ll
@@ -34,3 +34,14 @@ entry:
%add5 = add i32 %add3, %d
ret i32 %add5
}
+
+; rdar://9002648
+define i64 @test3(i64 %x) nounwind readnone ssp {
+entry:
+; CHECK: test3:
+; CHECK: leaq (%rdi,%rdi), %rax
+; CHECK-NOT: addq
+; CHECK-NEXT: ret
+ %0 = shl i64 %x, 1
+ ret i64 %0
+}
diff --git a/test/CodeGen/X86/umulo-64.ll b/test/CodeGen/X86/umulo-64.ll
deleted file mode 100644
index 280bd9cb066d..000000000000
--- a/test/CodeGen/X86/umulo-64.ll
+++ /dev/null
@@ -1,28 +0,0 @@
-; RUN: llc < %s -mtriple=i386-apple-darwin
-
-%0 = type { i64, i1 }
-
-define i32 @f0(i64 %a, i64 %b) nounwind ssp {
- %1 = alloca i64, align 4
- %2 = alloca i64, align 4
- store i64 %a, i64* %1, align 8
- store i64 %b, i64* %2, align 8
- %3 = load i64* %1, align 8
- %4 = load i64* %2, align 8
- %5 = call %0 @llvm.smul.with.overflow.i64(i64 %3, i64 %4)
- %6 = extractvalue %0 %5, 0
- %7 = extractvalue %0 %5, 1
- br i1 %7, label %8, label %9
-
-; <label>:8 ; preds = %0
- call void @llvm.trap()
- unreachable
-
-; <label>:9 ; preds = %0
- %10 = trunc i64 %6 to i32
- ret i32 %10
-}
-
-declare %0 @llvm.smul.with.overflow.i64(i64, i64) nounwind readnone
-
-declare void @llvm.trap() nounwind
diff --git a/test/CodeGen/X86/unaligned-load.ll b/test/CodeGen/X86/unaligned-load.ll
index 6a493c0594de..9f704898d688 100644
--- a/test/CodeGen/X86/unaligned-load.ll
+++ b/test/CodeGen/X86/unaligned-load.ll
@@ -29,8 +29,8 @@ return:
declare void @llvm.memcpy.i64(i8* nocapture, i8* nocapture, i64, i32) nounwind
; CORE2: .section
-; CORE2: .align 4
+; CORE2: .align 3
; CORE2-NEXT: _.str1:
; CORE2-NEXT: .asciz "DHRYSTONE PROGRAM, SOME STRING"
-; CORE2: .align 4
+; CORE2: .align 3
; CORE2-NEXT: _.str3:
diff --git a/test/CodeGen/X86/unknown-location.ll b/test/CodeGen/X86/unknown-location.ll
index 09431b5564ae..b89c4738af12 100644
--- a/test/CodeGen/X86/unknown-location.ll
+++ b/test/CodeGen/X86/unknown-location.ll
@@ -4,16 +4,11 @@
; represent this in the debug information. This is done by setting line
; and column to 0
-; CHECK: leal (%rdi,%rsi), %eax
+; CHECK: leal
; CHECK-NEXT: .loc 1 0 0
-; CHECK-NEXT: Ltmp
-; CHECK-NEXT: cltd
-; CHECK-NEXT: idivl %r8d
-; CHECK-NEXT: .loc 1 4 3
-; CHECK-NEXT: Ltmp
-; CHECK-NEXT: addl %ecx, %eax
-; CHECK-NEXT: ret
-; CHECK-NEXT: Ltmp
+; CHECK: cltd
+; CHECK-NEXT: idivl
+; CHECK-NEXT: .loc 2 4 3
define i32 @foo(i32 %w, i32 %x, i32 %y, i32 %z) nounwind {
entry:
diff --git a/test/CodeGen/X86/unreachable-stack-protector.ll b/test/CodeGen/X86/unreachable-stack-protector.ll
new file mode 100644
index 000000000000..eeebceea71d4
--- /dev/null
+++ b/test/CodeGen/X86/unreachable-stack-protector.ll
@@ -0,0 +1,19 @@
+; RUN: llc < %s | FileCheck %s
+target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
+target triple = "x86_64-apple-darwin10.0.0"
+
+declare i64 @llvm.objectsize.i64(i8*, i1) nounwind readnone
+
+define void @test5() nounwind optsize noinline ssp {
+entry:
+; CHECK: movq ___stack_chk_guard@GOTPCREL(%rip)
+ %buf = alloca [64 x i8], align 16
+ %0 = call i64 @llvm.objectsize.i64(i8* undef, i1 false)
+ br i1 false, label %if.end, label %if.then
+
+if.then: ; preds = %entry
+ unreachable
+
+if.end: ; preds = %entry
+ ret void
+}
diff --git a/test/CodeGen/X86/v2f32.ll b/test/CodeGen/X86/v2f32.ll
index 76c3fdfc060c..6d14099b5c0c 100644
--- a/test/CodeGen/X86/v2f32.ll
+++ b/test/CodeGen/X86/v2f32.ll
@@ -1,4 +1,5 @@
-; RUN: llc < %s -march=x86-64 -mcpu=penryn -asm-verbose=0 -o - | FileCheck %s -check-prefix=X64
+; RUN: llc < %s -mtriple=x86_64-linux -mcpu=penryn -asm-verbose=0 -o - | FileCheck %s -check-prefix=X64
+; RUN: llc < %s -mtriple=x86_64-win32 -mcpu=penryn -asm-verbose=0 -o - | FileCheck %s -check-prefix=W64
; RUN: llc < %s -mcpu=yonah -march=x86 -asm-verbose=0 -o - | FileCheck %s -check-prefix=X32
; PR7518
@@ -15,6 +16,13 @@ define void @test1(<2 x float> %Q, float *%P2) nounwind {
; X64-NEXT: movss %xmm1, (%rdi)
; X64-NEXT: ret
+; W64: test1:
+; W64-NEXT: movdqa (%rcx), %xmm0
+; W64-NEXT: pshufd $1, %xmm0, %xmm1
+; W64-NEXT: addss %xmm0, %xmm1
+; W64-NEXT: movss %xmm1, (%rdx)
+; W64-NEXT: ret
+
; X32: test1:
; X32-NEXT: pshufd $1, %xmm0, %xmm1
; X32-NEXT: addss %xmm0, %xmm1
@@ -31,6 +39,14 @@ define <2 x float> @test2(<2 x float> %Q, <2 x float> %R, <2 x float> *%P) nounw
; X64: test2:
; X64-NEXT: addps %xmm1, %xmm0
; X64-NEXT: ret
+
+; W64: test2:
+; W64-NEXT: movaps (%rcx), %xmm0
+; W64-NEXT: addps (%rdx), %xmm0
+; W64-NEXT: ret
+
+; X32: test2:
+; X32: addps %xmm1, %xmm0
}
@@ -38,17 +54,35 @@ define <2 x float> @test3(<4 x float> %A) nounwind {
%B = shufflevector <4 x float> %A, <4 x float> undef, <2 x i32> <i32 0, i32 1>
%C = fadd <2 x float> %B, %B
ret <2 x float> %C
-; CHECK: test3:
-; CHECK-NEXT: addps %xmm0, %xmm0
-; CHECK-NEXT: ret
+; X64: test3:
+; X64-NEXT: addps %xmm0, %xmm0
+; X64-NEXT: ret
+
+; W64: test3:
+; W64-NEXT: movaps (%rcx), %xmm0
+; W64-NEXT: addps %xmm0, %xmm0
+; W64-NEXT: ret
+
+; X32: test3:
+; X32-NEXT: addps %xmm0, %xmm0
+; X32-NEXT: ret
}
define <2 x float> @test4(<2 x float> %A) nounwind {
%C = fadd <2 x float> %A, %A
ret <2 x float> %C
-; CHECK: test4:
-; CHECK-NEXT: addps %xmm0, %xmm0
-; CHECK-NEXT: ret
+; X64: test4:
+; X64-NEXT: addps %xmm0, %xmm0
+; X64-NEXT: ret
+
+; W64: test4:
+; W64-NEXT: movaps (%rcx), %xmm0
+; W64-NEXT: addps %xmm0, %xmm0
+; W64-NEXT: ret
+
+; X32: test4:
+; X32-NEXT: addps %xmm0, %xmm0
+; X32-NEXT: ret
}
define <4 x float> @test5(<4 x float> %A) nounwind {
@@ -61,10 +95,21 @@ BB:
%E = shufflevector <2 x float> %D, <2 x float> undef, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>
ret <4 x float> %E
-; CHECK: _test5:
-; CHECK-NEXT: addps %xmm0, %xmm0
-; CHECK-NEXT: addps %xmm0, %xmm0
-; CHECK-NEXT: ret
+; X64: test5:
+; X64-NEXT: addps %xmm0, %xmm0
+; X64-NEXT: addps %xmm0, %xmm0
+; X64-NEXT: ret
+
+; W64: test5:
+; W64-NEXT: movaps (%rcx), %xmm0
+; W64-NEXT: addps %xmm0, %xmm0
+; W64-NEXT: addps %xmm0, %xmm0
+; W64-NEXT: ret
+
+; X32: test5:
+; X32-NEXT: addps %xmm0, %xmm0
+; X32-NEXT: addps %xmm0, %xmm0
+; X32-NEXT: ret
}
diff --git a/test/CodeGen/X86/vec_cast.ll b/test/CodeGen/X86/vec_cast.ll
index 95289c9685a1..90d39d0b46ab 100644
--- a/test/CodeGen/X86/vec_cast.ll
+++ b/test/CodeGen/X86/vec_cast.ll
@@ -1,5 +1,5 @@
-; RUN: llc < %s -march=x86-64 -mcpu=core2
-
+; RUN: llc < %s -mtriple=x86_64-linux -mcpu=core2
+; RUN: llc < %s -mtriple=x86_64-win32 -mcpu=core2
define <8 x i32> @a(<8 x i16> %a) nounwind {
%c = sext <8 x i16> %a to <8 x i32>
diff --git a/test/CodeGen/X86/vec_set-8.ll b/test/CodeGen/X86/vec_set-8.ll
index 9697f1186d45..66056d0add9c 100644
--- a/test/CodeGen/X86/vec_set-8.ll
+++ b/test/CodeGen/X86/vec_set-8.ll
@@ -1,5 +1,8 @@
-; RUN: llc < %s -march=x86-64 | not grep movsd
-; RUN: llc < %s -march=x86-64 | grep {movd.*%rdi,.*%xmm0}
+; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s
+; RUN: llc < %s -mtriple=x86_64-win32 | FileCheck %s
+; CHECK-NOT: movsd
+; CHECK: movd {{%rdi|%rcx}}, %xmm0
+; CHECK-NOT: movsd
define <2 x i64> @test(i64 %i) nounwind {
entry:
diff --git a/test/CodeGen/X86/vec_shuffle-16.ll b/test/CodeGen/X86/vec_shuffle-16.ll
index 470f676d4627..2ee87fe4ff86 100644
--- a/test/CodeGen/X86/vec_shuffle-16.ll
+++ b/test/CodeGen/X86/vec_shuffle-16.ll
@@ -1,27 +1,36 @@
-; RUN: llc < %s -march=x86 -mattr=+sse,-sse2 -mtriple=i386-apple-darwin -o %t
-; RUN: grep shufps %t | count 4
-; RUN: grep movaps %t | count 2
-; RUN: llc < %s -march=x86 -mattr=+sse2 -mtriple=i386-apple-darwin -o %t
-; RUN: grep pshufd %t | count 4
-; RUN: not grep shufps %t
-; RUN: not grep mov %t
+; RUN: llc < %s -march=x86 -mattr=+sse,-sse2 -mtriple=i386-apple-darwin | FileCheck %s -check-prefix=sse
+; RUN: llc < %s -march=x86 -mattr=+sse2 -mtriple=i386-apple-darwin | FileCheck %s -check-prefix=sse2
define <4 x float> @t1(<4 x float> %a, <4 x float> %b) nounwind {
+; sse: movaps
+; sse: shufps
+; sse2: pshufd
+; sse2-NEXT: ret
%tmp1 = shufflevector <4 x float> %b, <4 x float> undef, <4 x i32> zeroinitializer
ret <4 x float> %tmp1
}
define <4 x float> @t2(<4 x float> %A, <4 x float> %B) nounwind {
+; sse: shufps
+; sse2: pshufd
+; sse2-NEXT: ret
%tmp = shufflevector <4 x float> %A, <4 x float> %B, <4 x i32> < i32 3, i32 3, i32 3, i32 3 >
ret <4 x float> %tmp
}
define <4 x float> @t3(<4 x float> %A, <4 x float> %B) nounwind {
+; sse: movaps
+; sse: shufps
+; sse2: pshufd
+; sse2-NEXT: ret
%tmp = shufflevector <4 x float> %A, <4 x float> %B, <4 x i32> < i32 4, i32 4, i32 4, i32 4 >
ret <4 x float> %tmp
}
define <4 x float> @t4(<4 x float> %A, <4 x float> %B) nounwind {
+; sse: shufps
+; sse2: pshufd
+; sse2-NEXT: ret
%tmp = shufflevector <4 x float> %A, <4 x float> %B, <4 x i32> < i32 1, i32 3, i32 2, i32 0 >
ret <4 x float> %tmp
}
diff --git a/test/CodeGen/X86/vec_shuffle-17.ll b/test/CodeGen/X86/vec_shuffle-17.ll
index 9c33abb4421a..ebc8c5b34a90 100644
--- a/test/CodeGen/X86/vec_shuffle-17.ll
+++ b/test/CodeGen/X86/vec_shuffle-17.ll
@@ -1,5 +1,8 @@
-; RUN: llc < %s -march=x86-64 | grep {movd.*%rdi, %xmm0}
-; RUN: llc < %s -march=x86-64 | not grep xor
+; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s
+; RUN: llc < %s -mtriple=x86_64-win32 | FileCheck %s
+; CHECK-NOT: xor
+; CHECK: movd {{%rdi|%rcx}}, %xmm0
+; CHECK-NOT: xor
; PR2108
define <2 x i64> @doload64(i64 %x) nounwind {
diff --git a/test/CodeGen/X86/vec_uint_to_fp.ll b/test/CodeGen/X86/vec_uint_to_fp.ll
new file mode 100644
index 000000000000..39e7d715c5bb
--- /dev/null
+++ b/test/CodeGen/X86/vec_uint_to_fp.ll
@@ -0,0 +1,11 @@
+; RUN: llc < %s -march=x86 -mcpu=sandybridge | FileCheck %s
+
+; Test that we are not lowering uinttofp to scalars
+define <4 x float> @test1(<4 x i32> %A) nounwind {
+; CHECK: test1:
+; CHECK-NOT: cvtsd2ss
+; CHECK: ret
+ %C = uitofp <4 x i32> %A to <4 x float>
+ ret <4 x float> %C
+}
+
diff --git a/test/CodeGen/X86/visibility.ll b/test/CodeGen/X86/visibility.ll
index a8d287083a80..580c3dc9266d 100644
--- a/test/CodeGen/X86/visibility.ll
+++ b/test/CodeGen/X86/visibility.ll
@@ -1,11 +1,14 @@
; RUN: llc -mtriple=x86_64-unknown-linux-gnu %s -o - | FileCheck %s
+@zed = external hidden constant i32
+
define hidden void @foo() nounwind {
entry:
- call void @bar()
+ call void @bar(i32* @zed)
ret void
}
-declare hidden void @bar()
+declare hidden void @bar(i32*)
+;CHECK: .hidden zed
;CHECK: .hidden bar
diff --git a/test/CodeGen/X86/widen_load-0.ll b/test/CodeGen/X86/widen_load-0.ll
index f6c4af03209b..82c8252e7bbc 100644
--- a/test/CodeGen/X86/widen_load-0.ll
+++ b/test/CodeGen/X86/widen_load-0.ll
@@ -1,4 +1,5 @@
-; RUN: llc < %s -o - -march=x86-64 | FileCheck %s
+; RUN: llc < %s -o - -mtriple=x86_64-linux | FileCheck %s
+; RUN: llc < %s -o - -mtriple=x86_64-win32 | FileCheck %s -check-prefix=WIN64
; PR4891
; Both loads should happen before either store.
@@ -8,6 +9,11 @@
; CHECK: movl %ecx, (%rdi)
; CHECK: movl %eax, (%rsi)
+; WIN64: movl (%rcx), %eax
+; WIN64: movl (%rdx), %esi
+; WIN64: movl %esi, (%rcx)
+; WIN64: movl %eax, (%rdx)
+
define void @short2_int_swap(<2 x i16>* nocapture %b, i32* nocapture %c) nounwind {
entry:
%0 = load <2 x i16>* %b, align 2 ; <<2 x i16>> [#uses=1]
diff --git a/test/CodeGen/X86/win64_alloca_dynalloca.ll b/test/CodeGen/X86/win64_alloca_dynalloca.ll
new file mode 100644
index 000000000000..cbd38da60e96
--- /dev/null
+++ b/test/CodeGen/X86/win64_alloca_dynalloca.ll
@@ -0,0 +1,74 @@
+; RUN: llc < %s -mtriple=x86_64-mingw32 | FileCheck %s -check-prefix=M64
+; RUN: llc < %s -mtriple=x86_64-win32 | FileCheck %s -check-prefix=W64
+; RUN: llc < %s -mtriple=x86_64-win32-macho | FileCheck %s -check-prefix=EFI
+; PR8777
+; PR8778
+
+define i64 @foo(i64 %n, i64 %x) nounwind {
+entry:
+
+ %buf0 = alloca i8, i64 4096, align 1
+
+; ___chkstk must adjust %rsp.
+; M64: movq %rsp, %rbp
+; M64: $4096, %rax
+; M64: callq ___chkstk
+; M64-NOT: %rsp
+
+; __chkstk does not adjust %rsp.
+; W64: movq %rsp, %rbp
+; W64: $4096, %rax
+; W64: callq __chkstk
+; W64: subq $4096, %rsp
+
+; Freestanding
+; EFI: movq %rsp, %rbp
+; EFI: $[[B0OFS:4096|4104]], %rsp
+; EFI-NOT: call
+
+ %buf1 = alloca i8, i64 %n, align 1
+
+; M64: leaq 15(%rcx), %rax
+; M64: andq $-16, %rax
+; M64: callq ___chkstk
+; M64-NOT: %rsp
+; M64: movq %rsp, %rax
+
+; W64: leaq 15(%rcx), %rax
+; W64: andq $-16, %rax
+; W64: callq __chkstk
+; W64: subq %rax, %rsp
+; W64: movq %rsp, %rax
+
+; EFI: leaq 15(%rcx), [[R1:%r..]]
+; EFI: andq $-16, [[R1]]
+; EFI: movq %rsp, [[R64:%r..]]
+; EFI: subq [[R1]], [[R64]]
+; EFI: movq [[R64]], %rsp
+
+ %r = call i64 @bar(i64 %n, i64 %x, i64 %n, i8* %buf0, i8* %buf1) nounwind
+
+; M64: subq $48, %rsp
+; M64: leaq -4096(%rbp), %r9
+; M64: movq %rax, 32(%rsp)
+; M64: callq bar
+
+; W64: subq $48, %rsp
+; W64: leaq -4096(%rbp), %r9
+; W64: movq %rax, 32(%rsp)
+; W64: callq bar
+
+; EFI: subq $48, %rsp
+; EFI: leaq -[[B0OFS]](%rbp), %r9
+; EFI: movq [[R64]], 32(%rsp)
+; EFI: callq _bar
+
+ ret i64 %r
+
+; M64: movq %rbp, %rsp
+
+; W64: movq %rbp, %rsp
+
+}
+
+declare i64 @bar(i64, i64, i64, i8* nocapture, i8* nocapture) nounwind
diff --git a/test/CodeGen/X86/win64_vararg.ll b/test/CodeGen/X86/win64_vararg.ll
index a451318f6e8c..efe8bcacbeae 100644
--- a/test/CodeGen/X86/win64_vararg.ll
+++ b/test/CodeGen/X86/win64_vararg.ll
@@ -18,3 +18,36 @@ entry:
}
declare void @llvm.va_start(i8*) nounwind
+
+; CHECK: f5:
+; CHECK: pushq
+; CHECK: leaq 56(%rsp),
+define i8* @f5(i64 %a0, i64 %a1, i64 %a2, i64 %a3, i64 %a4, ...) nounwind {
+entry:
+ %ap = alloca i8*, align 8
+ %ap1 = bitcast i8** %ap to i8*
+ call void @llvm.va_start(i8* %ap1)
+ ret i8* %ap1
+}
+
+; CHECK: f4:
+; CHECK: pushq
+; CHECK: leaq 48(%rsp),
+define i8* @f4(i64 %a0, i64 %a1, i64 %a2, i64 %a3, ...) nounwind {
+entry:
+ %ap = alloca i8*, align 8
+ %ap1 = bitcast i8** %ap to i8*
+ call void @llvm.va_start(i8* %ap1)
+ ret i8* %ap1
+}
+
+; CHECK: f3:
+; CHECK: pushq
+; CHECK: leaq 40(%rsp),
+define i8* @f3(i64 %a0, i64 %a1, i64 %a2, ...) nounwind {
+entry:
+ %ap = alloca i8*, align 8
+ %ap1 = bitcast i8** %ap to i8*
+ call void @llvm.va_start(i8* %ap1)
+ ret i8* %ap1
+}
diff --git a/test/CodeGen/X86/win_chkstk.ll b/test/CodeGen/X86/win_chkstk.ll
index 82ce81d4ae70..e4e4483ff949 100644
--- a/test/CodeGen/X86/win_chkstk.ll
+++ b/test/CodeGen/X86/win_chkstk.ll
@@ -3,6 +3,7 @@
; RUN: llc < %s -mtriple=i686-pc-mingw32 | FileCheck %s -check-prefix=MINGW_X32
; RUN: llc < %s -mtriple=x86_64-pc-mingw32 | FileCheck %s -check-prefix=MINGW_X64
; RUN: llc < %s -mtriple=i386-pc-linux | FileCheck %s -check-prefix=LINUX
+; RUN: llc < %s -mtriple=x86_64-pc-win32-macho | FileCheck %s -check-prefix=LINUX
; Windows and mingw require a prologue helper routine if more than 4096 bytes area
; allocated on the stack. Windows uses __chkstk and mingw uses __alloca. __alloca
@@ -16,7 +17,7 @@ entry:
; WIN_X32: calll __chkstk
; WIN_X64: callq __chkstk
; MINGW_X32: calll __alloca
-; MINGW_X64: callq __chkstk
+; MINGW_X64: callq ___chkstk
; LINUX-NOT: call __chkstk
%array4096 = alloca [4096 x i8], align 16 ; <[4096 x i8]*> [#uses=0]
ret i32 0
diff --git a/test/CodeGen/X86/x86-64-malloc.ll b/test/CodeGen/X86/x86-64-malloc.ll
index b4f1fa666720..4aa0ec3dc9f7 100644
--- a/test/CodeGen/X86/x86-64-malloc.ll
+++ b/test/CodeGen/X86/x86-64-malloc.ll
@@ -1,4 +1,6 @@
-; RUN: llc < %s -march=x86-64 | grep {shll.*3, %edi}
+; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s
+; RUN: llc < %s -mtriple=x86_64-win32 | FileCheck %s
+; CHECK: shll $3, {{%edi|%ecx}}
; PR3829
; The generated code should multiply by 3 (sizeof i8*) as an i32,
; not as an i64!
diff --git a/test/CodeGen/X86/zext-extract_subreg.ll b/test/CodeGen/X86/zext-extract_subreg.ll
index e61e8805a2fd..4f1dde3c4f0e 100644
--- a/test/CodeGen/X86/zext-extract_subreg.ll
+++ b/test/CodeGen/X86/zext-extract_subreg.ll
@@ -13,6 +13,7 @@ if.end: ; preds = %if.end.i
; CHECK: %if.end
; CHECK: movl (%{{.*}}), [[REG:%[a-z]+]]
; CHECK-NOT: movl [[REG]], [[REG]]
+; CHECK-NEXT: testl [[REG]], [[REG]]
; CHECK-NEXT: xorb
%tmp138 = select i1 undef, i32 0, i32 %tmp7.i
%tmp867 = zext i32 %tmp138 to i64
diff --git a/test/CodeGen/X86/zext-sext.ll b/test/CodeGen/X86/zext-sext.ll
index bd109b92d9f7..cea9e9c854db 100644
--- a/test/CodeGen/X86/zext-sext.ll
+++ b/test/CodeGen/X86/zext-sext.ll
@@ -1,3 +1,4 @@
+; XFAIL: *
; RUN: llc < %s -march=x86-64 | FileCheck %s
; <rdar://problem/8006248>
diff --git a/test/CodeGen/XCore/events.ll b/test/CodeGen/XCore/events.ll
index 4fc2f26d1b6b..30a6ec35513e 100644
--- a/test/CodeGen/XCore/events.ll
+++ b/test/CodeGen/XCore/events.ll
@@ -2,6 +2,7 @@
declare void @llvm.xcore.setv.p1i8(i8 addrspace(1)* %r, i8* %p)
declare i8* @llvm.xcore.waitevent()
+declare i8* @llvm.xcore.checkevent(i8*)
declare void @llvm.xcore.clre()
define i32 @f(i8 addrspace(1)* %r) nounwind {
@@ -22,3 +23,22 @@ ret:
%retval = phi i32 [1, %L1], [2, %L2]
ret i32 %retval
}
+
+define i32 @g(i8 addrspace(1)* %r) nounwind {
+; CHECK: g:
+entry:
+; CHECK: clre
+ call void @llvm.xcore.clre()
+ call void @llvm.xcore.setv.p1i8(i8 addrspace(1)* %r, i8* blockaddress(@f, %L1))
+ %goto_addr = call i8* @llvm.xcore.checkevent(i8 *blockaddress(@f, %L2))
+; CHECK: setsr 1
+; CHECK: clrsr 1
+ indirectbr i8* %goto_addr, [label %L1, label %L2]
+L1:
+ br label %ret
+L2:
+ br label %ret
+ret:
+ %retval = phi i32 [1, %L1], [2, %L2]
+ ret i32 %retval
+}
diff --git a/test/CodeGen/XCore/mul64.ll b/test/CodeGen/XCore/mul64.ll
index 1dc94712507e..77c6b4268849 100644
--- a/test/CodeGen/XCore/mul64.ll
+++ b/test/CodeGen/XCore/mul64.ll
@@ -1,4 +1,5 @@
; RUN: llc < %s -march=xcore | FileCheck %s
+; RUN: llc < %s -march=xcore -regalloc=basic | FileCheck %s
define i64 @umul_lohi(i32 %a, i32 %b) {
entry:
%0 = zext i32 %a to i64
@@ -7,8 +8,8 @@ entry:
ret i64 %2
}
; CHECK: umul_lohi:
-; CHECK: ldc r2, 0
-; CHECK-NEXT: lmul r1, r0, r1, r0, r2, r2
+; CHECK: ldc [[REG:r[0-9]+]], 0
+; CHECK-NEXT: lmul r1, r0, r1, r0, [[REG]], [[REG]]
; CHECK-NEXT: retsp 0
define i64 @smul_lohi(i32 %a, i32 %b) {
@@ -19,11 +20,11 @@ entry:
ret i64 %2
}
; CHECK: smul_lohi:
-; CHECK: ldc r2, 0
-; CHECK-NEXT: mov r3, r2
-; CHECK-NEXT: maccs r2, r3, r1, r0
-; CHECK-NEXT: mov r0, r3
-; CHECK-NEXT: mov r1, r2
+; CHECK: ldc
+; CHECK-NEXT: mov
+; CHECK-NEXT: maccs
+; CHECK-NEXT: mov r0,
+; CHECK-NEXT: mov r1,
; CHECK-NEXT: retsp 0
define i64 @mul64(i64 %a, i64 %b) {
@@ -32,11 +33,11 @@ entry:
ret i64 %0
}
; CHECK: mul64:
-; CHECK: ldc r11, 0
-; CHECK-NEXT: lmul r11, r4, r0, r2, r11, r11
-; CHECK-NEXT: mul r0, r0, r3
-; CHECK-NEXT: lmul r0, r1, r1, r2, r11, r0
-; CHECK-NEXT: mov r0, r4
+; CHECK: ldc
+; CHECK-NEXT: lmul
+; CHECK-NEXT: mul
+; CHECK-NEXT: lmul
+; CHECK-NEXT: mov r0,
define i64 @mul64_2(i64 %a, i32 %b) {
entry:
@@ -45,8 +46,8 @@ entry:
ret i64 %1
}
; CHECK: mul64_2:
-; CHECK: ldc r3, 0
-; CHECK-NEXT: lmul r3, r0, r0, r2, r3, r3
-; CHECK-NEXT: mul r1, r1, r2
-; CHECK-NEXT: add r1, r3, r1
+; CHECK: ldc
+; CHECK-NEXT: lmul
+; CHECK-NEXT: mul
+; CHECK-NEXT: add r1,
; CHECK-NEXT: retsp 0
diff --git a/test/CodeGen/XCore/ps-intrinsics.ll b/test/CodeGen/XCore/ps-intrinsics.ll
new file mode 100644
index 000000000000..92b26c75e0e4
--- /dev/null
+++ b/test/CodeGen/XCore/ps-intrinsics.ll
@@ -0,0 +1,18 @@
+; RUN: llc < %s -march=xcore | FileCheck %s
+declare i32 @llvm.xcore.getps(i32)
+declare void @llvm.xcore.setps(i32, i32)
+
+define i32 @getps(i32 %reg) nounwind {
+; CHECK: getps:
+; CHECK: get r0, ps[r0]
+ %result = call i32 @llvm.xcore.getps(i32 %reg)
+ ret i32 %result
+}
+
+
+define void @setps(i32 %reg, i32 %value) nounwind {
+; CHECK: setps:
+; CHECK: set ps[r0], r1
+ call void @llvm.xcore.setps(i32 %reg, i32 %value)
+ ret void
+}
diff --git a/test/CodeGen/XCore/resources.ll b/test/CodeGen/XCore/resources.ll
index 3389912b8c0b..bd0492c88ee8 100644
--- a/test/CodeGen/XCore/resources.ll
+++ b/test/CodeGen/XCore/resources.ll
@@ -19,6 +19,9 @@ declare void @llvm.xcore.syncr.p1i8(i8 addrspace(1)* %r)
declare void @llvm.xcore.settw.p1i8(i8 addrspace(1)* %r, i32 %value)
declare void @llvm.xcore.setv.p1i8(i8 addrspace(1)* %r, i8* %p)
declare void @llvm.xcore.eeu.p1i8(i8 addrspace(1)* %r)
+declare void @llvm.xcore.setclk.p1i8.p1i8(i8 addrspace(1)* %a, i8 addrspace(1)* %b)
+declare void @llvm.xcore.setrdy.p1i8.p1i8(i8 addrspace(1)* %a, i8 addrspace(1)* %b)
+declare void @llvm.xcore.setpsc.p1i8(i8 addrspace(1)* %r, i32 %value)
define i8 addrspace(1)* @getr() {
; CHECK: getr:
@@ -174,3 +177,24 @@ define void @eeu(i8 addrspace(1)* %r) {
call void @llvm.xcore.eeu.p1i8(i8 addrspace(1)* %r)
ret void
}
+
+define void @setclk(i8 addrspace(1)* %a, i8 addrspace(1)* %b) {
+; CHECK: setclk
+; CHECK: setclk res[r0], r1
+ call void @llvm.xcore.setclk.p1i8.p1i8(i8 addrspace(1)* %a, i8 addrspace(1)* %b)
+ ret void
+}
+
+define void @setrdy(i8 addrspace(1)* %a, i8 addrspace(1)* %b) {
+; CHECK: setrdy
+; CHECK: setrdy res[r0], r1
+ call void @llvm.xcore.setrdy.p1i8.p1i8(i8 addrspace(1)* %a, i8 addrspace(1)* %b)
+ ret void
+}
+
+define void @setpsc(i8 addrspace(1)* %r, i32 %value) {
+; CHECK: setpsc
+; CHECK: setpsc res[r0], r1
+ call void @llvm.xcore.setpsc.p1i8(i8 addrspace(1)* %r, i32 %value)
+ ret void
+}
diff --git a/test/CodeGen/XCore/scavenging.ll b/test/CodeGen/XCore/scavenging.ll
new file mode 100644
index 000000000000..3181e96116b6
--- /dev/null
+++ b/test/CodeGen/XCore/scavenging.ll
@@ -0,0 +1,52 @@
+; RUN: llc < %s -march=xcore
+@size = global i32 0 ; <i32*> [#uses=1]
+@g0 = external global i32 ; <i32*> [#uses=2]
+@g1 = external global i32 ; <i32*> [#uses=2]
+@g2 = external global i32 ; <i32*> [#uses=2]
+@g3 = external global i32 ; <i32*> [#uses=2]
+@g4 = external global i32 ; <i32*> [#uses=2]
+@g5 = external global i32 ; <i32*> [#uses=2]
+@g6 = external global i32 ; <i32*> [#uses=2]
+@g7 = external global i32 ; <i32*> [#uses=2]
+@g8 = external global i32 ; <i32*> [#uses=2]
+@g9 = external global i32 ; <i32*> [#uses=2]
+@g10 = external global i32 ; <i32*> [#uses=2]
+@g11 = external global i32 ; <i32*> [#uses=2]
+
+define void @f() nounwind {
+entry:
+ %x = alloca [100 x i32], align 4 ; <[100 x i32]*> [#uses=2]
+ %0 = load i32* @size, align 4 ; <i32> [#uses=1]
+ %1 = alloca i32, i32 %0, align 4 ; <i32*> [#uses=1]
+ %2 = volatile load i32* @g0, align 4 ; <i32> [#uses=1]
+ %3 = volatile load i32* @g1, align 4 ; <i32> [#uses=1]
+ %4 = volatile load i32* @g2, align 4 ; <i32> [#uses=1]
+ %5 = volatile load i32* @g3, align 4 ; <i32> [#uses=1]
+ %6 = volatile load i32* @g4, align 4 ; <i32> [#uses=1]
+ %7 = volatile load i32* @g5, align 4 ; <i32> [#uses=1]
+ %8 = volatile load i32* @g6, align 4 ; <i32> [#uses=1]
+ %9 = volatile load i32* @g7, align 4 ; <i32> [#uses=1]
+ %10 = volatile load i32* @g8, align 4 ; <i32> [#uses=1]
+ %11 = volatile load i32* @g9, align 4 ; <i32> [#uses=1]
+ %12 = volatile load i32* @g10, align 4 ; <i32> [#uses=1]
+ %13 = volatile load i32* @g11, align 4 ; <i32> [#uses=2]
+ %14 = getelementptr [100 x i32]* %x, i32 0, i32 50 ; <i32*> [#uses=1]
+ store i32 %13, i32* %14, align 4
+ volatile store i32 %13, i32* @g11, align 4
+ volatile store i32 %12, i32* @g10, align 4
+ volatile store i32 %11, i32* @g9, align 4
+ volatile store i32 %10, i32* @g8, align 4
+ volatile store i32 %9, i32* @g7, align 4
+ volatile store i32 %8, i32* @g6, align 4
+ volatile store i32 %7, i32* @g5, align 4
+ volatile store i32 %6, i32* @g4, align 4
+ volatile store i32 %5, i32* @g3, align 4
+ volatile store i32 %4, i32* @g2, align 4
+ volatile store i32 %3, i32* @g1, align 4
+ volatile store i32 %2, i32* @g0, align 4
+ %x1 = getelementptr [100 x i32]* %x, i32 0, i32 0 ; <i32*> [#uses=1]
+ call void @g(i32* %x1, i32* %1) nounwind
+ ret void
+}
+
+declare void @g(i32*, i32*)
diff --git a/test/CodeGen/XCore/sr-intrinsics.ll b/test/CodeGen/XCore/sr-intrinsics.ll
new file mode 100644
index 000000000000..e12ed0380309
--- /dev/null
+++ b/test/CodeGen/XCore/sr-intrinsics.ll
@@ -0,0 +1,18 @@
+; RUN: llc < %s -march=xcore | FileCheck %s
+declare void @llvm.xcore.setsr(i32)
+declare void @llvm.xcore.clrsr(i32)
+
+define void @setsr() nounwind {
+; CHECK: setsr:
+; CHECK: setsr 128
+ call void @llvm.xcore.setsr(i32 128)
+ ret void
+}
+
+
+define void @clrsr() nounwind {
+; CHECK: clrsr:
+; CHECK: clrsr 128
+ call void @llvm.xcore.clrsr(i32 128)
+ ret void
+}
diff --git a/test/CodeGen/XCore/threads.ll b/test/CodeGen/XCore/threads.ll
new file mode 100644
index 000000000000..a0558e365cbb
--- /dev/null
+++ b/test/CodeGen/XCore/threads.ll
@@ -0,0 +1,67 @@
+; RUN: llc -march=xcore < %s | FileCheck %s
+
+declare i8 addrspace(1)* @llvm.xcore.getst.p1i8.p1i8(i8 addrspace(1)* %r)
+declare void @llvm.xcore.msync.p1i8(i8 addrspace(1)* %r)
+declare void @llvm.xcore.ssync()
+declare void @llvm.xcore.mjoin.p1i8(i8 addrspace(1)* %r)
+declare void @llvm.xcore.initsp.p1i8(i8 addrspace(1)* %r, i8* %value)
+declare void @llvm.xcore.initpc.p1i8(i8 addrspace(1)* %r, i8* %value)
+declare void @llvm.xcore.initlr.p1i8(i8 addrspace(1)* %r, i8* %value)
+declare void @llvm.xcore.initcp.p1i8(i8 addrspace(1)* %r, i8* %value)
+declare void @llvm.xcore.initdp.p1i8(i8 addrspace(1)* %r, i8* %value)
+
+define i8 addrspace(1)* @getst(i8 addrspace(1)* %r) {
+; CHECK: getst:
+; CHECK: getst r0, res[r0]
+ %result = call i8 addrspace(1)* @llvm.xcore.getst.p1i8.p1i8(i8 addrspace(1)* %r)
+ ret i8 addrspace(1)* %result
+}
+
+define void @ssync() {
+; CHECK: ssync:
+; CHECK: ssync
+ call void @llvm.xcore.ssync()
+ ret void
+}
+
+define void @mjoin(i8 addrspace(1)* %r) {
+; CHECK: mjoin:
+; CHECK: mjoin res[r0]
+ call void @llvm.xcore.mjoin.p1i8(i8 addrspace(1)* %r)
+ ret void
+}
+
+define void @initsp(i8 addrspace(1)* %t, i8* %src) {
+; CHECK: initsp:
+; CHECK: init t[r0]:sp, r1
+ call void @llvm.xcore.initsp.p1i8(i8 addrspace(1)* %t, i8* %src)
+ ret void
+}
+
+define void @initpc(i8 addrspace(1)* %t, i8* %src) {
+; CHECK: initpc:
+; CHECK: init t[r0]:pc, r1
+ call void @llvm.xcore.initpc.p1i8(i8 addrspace(1)* %t, i8* %src)
+ ret void
+}
+
+define void @initlr(i8 addrspace(1)* %t, i8* %src) {
+; CHECK: initlr:
+; CHECK: init t[r0]:lr, r1
+ call void @llvm.xcore.initlr.p1i8(i8 addrspace(1)* %t, i8* %src)
+ ret void
+}
+
+define void @initcp(i8 addrspace(1)* %t, i8* %src) {
+; CHECK: initcp:
+; CHECK: init t[r0]:cp, r1
+ call void @llvm.xcore.initcp.p1i8(i8 addrspace(1)* %t, i8* %src)
+ ret void
+}
+
+define void @initdp(i8 addrspace(1)* %t, i8* %src) {
+; CHECK: initdp:
+; CHECK: init t[r0]:dp, r1
+ call void @llvm.xcore.initdp.p1i8(i8 addrspace(1)* %t, i8* %src)
+ ret void
+}
diff --git a/test/CodeGen/XCore/trampoline.ll b/test/CodeGen/XCore/trampoline.ll
index 18cc45edbf9f..4e1aba025b2f 100644
--- a/test/CodeGen/XCore/trampoline.ll
+++ b/test/CodeGen/XCore/trampoline.ll
@@ -5,8 +5,8 @@
define void @f() nounwind {
entry:
; CHECK: f:
-; CHECK ldap r11, g.1101
-; CHECK stw r11, sp[7]
+; CHECK: ldap r11, g.1101
+; CHECK: stw r11, sp[7]
%TRAMP.23 = alloca [20 x i8], align 2
%FRAME.0 = alloca %struct.FRAME.f, align 4
%TRAMP.23.sub = getelementptr inbounds [20 x i8]* %TRAMP.23, i32 0, i32 0