2009-09-09 22:22:57 +08:00
|
|
|
; RUN: llc %s -o - -march=x86-64 -mtriple=x86_64-unknown-linux-gnu -disable-mmx | FileCheck %s
|
|
|
|
; PR4891
|
|
|
|
|
|
|
|
; This load should be before the call, not after.
|
|
|
|
|
2010-01-24 08:05:03 +08:00
|
|
|
; CHECK: movaps compl+128(%rip), %xmm0
|
2009-09-09 22:22:57 +08:00
|
|
|
; CHECK: movaps %xmm0, (%rsp)
|
Instruction fixes, added instructions, and AsmString changes in the
X86 instruction tables.
Also (while I was at it) cleaned up the X86 tables, removing tabs and
80-line violations.
This patch was reviewed by Chris Lattner, but please let me know if
there are any problems.
* X86*.td
Removed tabs and fixed 80-line violations
* X86Instr64bit.td
(IRET, POPCNT, BT_, LSL, SWPGS, PUSH_S, POP_S, L_S, SMSW)
Added
(CALL, CMOV) Added qualifiers
(JMP) Added PC-relative jump instruction
(POPFQ/PUSHFQ) Added qualifiers; renamed PUSHFQ to indicate
that it is 64-bit only (ambiguous since it has no
REX prefix)
(MOV) Added rr form going the other way, which is encoded
differently
(MOV) Changed immediates to offsets, which is more correct;
also fixed MOV64o64a to have to a 64-bit offset
(MOV) Fixed qualifiers
(MOV) Added debug-register and condition-register moves
(MOVZX) Added more forms
(ADC, SUB, SBB, AND, OR, XOR) Added reverse forms, which
(as with MOV) are encoded differently
(ROL) Made REX.W required
(BT) Uncommented mr form for disassembly only
(CVT__2__) Added several missing non-intrinsic forms
(LXADD, XCHG) Reordered operands to make more sense for
MRMSrcMem
(XCHG) Added register-to-register forms
(XADD, CMPXCHG, XCHG) Added non-locked forms
* X86InstrSSE.td
(CVTSS2SI, COMISS, CVTTPS2DQ, CVTPS2PD, CVTPD2PS, MOVQ)
Added
* X86InstrFPStack.td
(COM_FST0, COMP_FST0, COM_FI, COM_FIP, FFREE, FNCLEX, FNOP,
FXAM, FLDL2T, FLDL2E, FLDPI, FLDLG2, FLDLN2, F2XM1, FYL2X,
FPTAN, FPATAN, FXTRACT, FPREM1, FDECSTP, FINCSTP, FPREM,
FYL2XP1, FSINCOS, FRNDINT, FSCALE, FCOMPP, FXSAVE,
FXRSTOR)
Added
(FCOM, FCOMP) Added qualifiers
(FSTENV, FSAVE, FSTSW) Fixed opcode names
(FNSTSW) Added implicit register operand
* X86InstrInfo.td
(opaque512mem) Added for FXSAVE/FXRSTOR
(offset8, offset16, offset32, offset64) Added for MOV
(NOOPW, IRET, POPCNT, IN, BTC, BTR, BTS, LSL, INVLPG, STR,
LTR, PUSHFS, PUSHGS, POPFS, POPGS, LDS, LSS, LES, LFS,
LGS, VERR, VERW, SGDT, SIDT, SLDT, LGDT, LIDT, LLDT,
LODSD, OUTSB, OUTSW, OUTSD, HLT, RSM, FNINIT, CLC, STC,
CLI, STI, CLD, STD, CMC, CLTS, XLAT, WRMSR, RDMSR, RDPMC,
SMSW, LMSW, CPUID, INVD, WBINVD, INVEPT, INVVPID, VMCALL,
VMCLEAR, VMLAUNCH, VMRESUME, VMPTRLD, VMPTRST, VMREAD,
VMWRITE, VMXOFF, VMXON) Added
(NOOPL, POPF, POPFD, PUSHF, PUSHFD) Added qualifier
(JO, JNO, JB, JAE, JE, JNE, JBE, JA, JS, JNS, JP, JNP, JL,
JGE, JLE, JG, JCXZ) Added 32-bit forms
(MOV) Changed some immediate forms to offset forms
(MOV) Added reversed reg-reg forms, which are encoded
differently
(MOV) Added debug-register and condition-register moves
(CMOV) Added qualifiers
(AND, OR, XOR, ADC, SUB, SBB) Added reverse forms, like MOV
(BT) Uncommented memory-register forms for disassembler
(MOVSX, MOVZX) Added forms
(XCHG, LXADD) Made operand order make sense for MRMSrcMem
(XCHG) Added register-register forms
(XADD, CMPXCHG) Added unlocked forms
* X86InstrMMX.td
(MMX_MOVD, MMV_MOVQ) Added forms
* X86InstrInfo.cpp: Changed PUSHFQ to PUSHFQ64 to reflect table
change
* X86RegisterInfo.td: Added debug and condition register sets
* x86-64-pic-3.ll: Fixed testcase to reflect call qualifier
* peep-test-3.ll: Fixed testcase to reflect test qualifier
* cmov.ll: Fixed testcase to reflect cmov qualifier
* loop-blocks.ll: Fixed testcase to reflect call qualifier
* x86-64-pic-11.ll: Fixed testcase to reflect call qualifier
* 2009-11-04-SubregCoalescingBug.ll: Fixed testcase to reflect call
qualifier
* x86-64-pic-2.ll: Fixed testcase to reflect call qualifier
* live-out-reg-info.ll: Fixed testcase to reflect test qualifier
* tail-opts.ll: Fixed testcase to reflect call qualifiers
* x86-64-pic-10.ll: Fixed testcase to reflect call qualifier
* bss-pagealigned.ll: Fixed testcase to reflect call qualifier
* x86-64-pic-1.ll: Fixed testcase to reflect call qualifier
* widen_load-1.ll: Fixed testcase to reflect call qualifier
llvm-svn: 91638
2009-12-18 08:01:26 +08:00
|
|
|
; CHECK: callq killcommon
|
2009-09-09 22:22:57 +08:00
|
|
|
|
|
|
|
@compl = linkonce global [20 x i64] zeroinitializer, align 64 ; <[20 x i64]*> [#uses=1]
|
|
|
|
|
|
|
|
declare void @killcommon(i32* noalias)
|
|
|
|
|
|
|
|
define void @reset(<2 x float>* noalias %garbage1) {
|
|
|
|
"file complex.c, line 27, bb1":
|
|
|
|
%changed = alloca i32, align 4 ; <i32*> [#uses=3]
|
|
|
|
br label %"file complex.c, line 27, bb13"
|
|
|
|
|
|
|
|
"file complex.c, line 27, bb13": ; preds = %"file complex.c, line 27, bb1"
|
|
|
|
store i32 0, i32* %changed, align 4
|
|
|
|
%r2 = getelementptr float* bitcast ([20 x i64]* @compl to float*), i64 32 ; <float*> [#uses=1]
|
|
|
|
%r3 = bitcast float* %r2 to <2 x float>* ; <<2 x float>*> [#uses=1]
|
|
|
|
%r4 = load <2 x float>* %r3, align 4 ; <<2 x float>> [#uses=1]
|
|
|
|
call void @killcommon(i32* %changed)
|
|
|
|
br label %"file complex.c, line 34, bb4"
|
|
|
|
|
|
|
|
"file complex.c, line 34, bb4": ; preds = %"file complex.c, line 27, bb13"
|
|
|
|
%r5 = load i32* %changed, align 4 ; <i32> [#uses=1]
|
|
|
|
%r6 = icmp eq i32 %r5, 0 ; <i1> [#uses=1]
|
|
|
|
%r7 = zext i1 %r6 to i32 ; <i32> [#uses=1]
|
|
|
|
%r8 = icmp ne i32 %r7, 0 ; <i1> [#uses=1]
|
|
|
|
br i1 %r8, label %"file complex.c, line 34, bb7", label %"file complex.c, line 27, bb5"
|
|
|
|
|
|
|
|
"file complex.c, line 27, bb5": ; preds = %"file complex.c, line 34, bb4"
|
|
|
|
br label %"file complex.c, line 35, bb6"
|
|
|
|
|
|
|
|
"file complex.c, line 35, bb6": ; preds = %"file complex.c, line 27, bb5"
|
|
|
|
%r11 = ptrtoint <2 x float>* %garbage1 to i64 ; <i64> [#uses=1]
|
|
|
|
%r12 = inttoptr i64 %r11 to <2 x float>* ; <<2 x float>*> [#uses=1]
|
|
|
|
store <2 x float> %r4, <2 x float>* %r12, align 4
|
|
|
|
br label %"file complex.c, line 34, bb7"
|
|
|
|
|
|
|
|
"file complex.c, line 34, bb7": ; preds = %"file complex.c, line 35, bb6", %"file complex.c, line 34, bb4"
|
|
|
|
ret void
|
|
|
|
}
|