rename *.llx -> *.ll
authorChris Lattner <sabre@nondot.org>
Sat, 19 Apr 2008 22:29:10 +0000 (22:29 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 19 Apr 2008 22:29:10 +0000 (22:29 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49970 91177308-0d34-0410-b5e6-96231b3b80d8

58 files changed:
test/CodeGen/CBackend/2003-06-28-LinkOnceGlobalVars.ll [new file with mode: 0644]
test/CodeGen/CBackend/2003-06-28-LinkOnceGlobalVars.llx [deleted file]
test/CodeGen/CBackend/2004-02-13-FrameReturnAddress.ll [new file with mode: 0644]
test/CodeGen/CBackend/2004-02-13-FrameReturnAddress.llx [deleted file]
test/CodeGen/CBackend/2004-02-15-PreexistingExternals.ll [new file with mode: 0644]
test/CodeGen/CBackend/2004-02-15-PreexistingExternals.llx [deleted file]
test/CodeGen/CBackend/2004-02-26-FPNotPrintableConstants.ll [new file with mode: 0644]
test/CodeGen/CBackend/2004-02-26-FPNotPrintableConstants.llx [deleted file]
test/CodeGen/CBackend/2004-02-26-LinkOnceFunctions.ll [new file with mode: 0644]
test/CodeGen/CBackend/2004-02-26-LinkOnceFunctions.llx [deleted file]
test/CodeGen/CBackend/2004-11-13-FunctionPointerCast.ll [new file with mode: 0644]
test/CodeGen/CBackend/2004-11-13-FunctionPointerCast.llx [deleted file]
test/CodeGen/Generic/2004-02-08-UnwindSupport.ll [new file with mode: 0644]
test/CodeGen/Generic/2004-02-08-UnwindSupport.llx [deleted file]
test/CodeGen/Generic/2004-05-09-LiveVarPartialRegister.ll [new file with mode: 0644]
test/CodeGen/Generic/2004-05-09-LiveVarPartialRegister.llx [deleted file]
test/CodeGen/Generic/BasicInstrs.ll [new file with mode: 0644]
test/CodeGen/Generic/BasicInstrs.llx [deleted file]
test/CodeGen/Generic/ConstantExprLowering.ll [new file with mode: 0644]
test/CodeGen/Generic/ConstantExprLowering.llx [deleted file]
test/CodeGen/X86/2002-12-23-LocalRAProblem.ll [new file with mode: 0644]
test/CodeGen/X86/2002-12-23-LocalRAProblem.llx [deleted file]
test/CodeGen/X86/2002-12-23-SubProblem.ll [new file with mode: 0644]
test/CodeGen/X86/2002-12-23-SubProblem.llx [deleted file]
test/CodeGen/X86/2003-08-03-CallArgLiveRanges.ll [new file with mode: 0644]
test/CodeGen/X86/2003-08-03-CallArgLiveRanges.llx [deleted file]
test/CodeGen/X86/2003-08-23-DeadBlockTest.ll [new file with mode: 0644]
test/CodeGen/X86/2003-08-23-DeadBlockTest.llx [deleted file]
test/CodeGen/X86/2003-11-03-GlobalBool.ll [new file with mode: 0644]
test/CodeGen/X86/2003-11-03-GlobalBool.llx [deleted file]
test/CodeGen/X86/2004-02-12-Memcpy.ll [new file with mode: 0644]
test/CodeGen/X86/2004-02-12-Memcpy.llx [deleted file]
test/CodeGen/X86/2004-02-13-FrameReturnAddress.ll [new file with mode: 0644]
test/CodeGen/X86/2004-02-13-FrameReturnAddress.llx [deleted file]
test/CodeGen/X86/2004-02-14-InefficientStackPointer.ll [new file with mode: 0644]
test/CodeGen/X86/2004-02-14-InefficientStackPointer.llx [deleted file]
test/CodeGen/X86/2004-02-22-Casts.ll [new file with mode: 0644]
test/CodeGen/X86/2004-02-22-Casts.llx [deleted file]
test/CodeGen/X86/2004-03-30-Select-Max.ll [new file with mode: 0644]
test/CodeGen/X86/2004-03-30-Select-Max.llx [deleted file]
test/CodeGen/X86/2004-04-09-SameValueCoalescing.ll [new file with mode: 0644]
test/CodeGen/X86/2004-04-09-SameValueCoalescing.llx [deleted file]
test/CodeGen/X86/2004-04-13-FPCMOV-Crash.ll [new file with mode: 0644]
test/CodeGen/X86/2004-04-13-FPCMOV-Crash.llx [deleted file]
test/CodeGen/X86/2004-06-10-StackifierCrash.ll [new file with mode: 0644]
test/CodeGen/X86/2004-06-10-StackifierCrash.llx [deleted file]
test/CodeGen/X86/2004-10-08-SelectSetCCFold.ll [new file with mode: 0644]
test/CodeGen/X86/2004-10-08-SelectSetCCFold.llx [deleted file]
test/CodeGen/X86/compare_folding.ll [new file with mode: 0644]
test/CodeGen/X86/compare_folding.llx [deleted file]
test/CodeGen/X86/fp_constant_op.ll [new file with mode: 0644]
test/CodeGen/X86/fp_constant_op.llx [deleted file]
test/CodeGen/X86/fp_load_cast_fold.ll [new file with mode: 0644]
test/CodeGen/X86/fp_load_cast_fold.llx [deleted file]
test/CodeGen/X86/fp_load_fold.ll [new file with mode: 0644]
test/CodeGen/X86/fp_load_fold.llx [deleted file]
test/CodeGen/X86/shift-double.ll [new file with mode: 0644]
test/CodeGen/X86/shift-double.llx [deleted file]

diff --git a/test/CodeGen/CBackend/2003-06-28-LinkOnceGlobalVars.ll b/test/CodeGen/CBackend/2003-06-28-LinkOnceGlobalVars.ll
new file mode 100644 (file)
index 0000000..ef3b579
--- /dev/null
@@ -0,0 +1,3 @@
+; RUN: llvm-as < %s | llc -march=c | grep common | grep X
+
+@X = linkonce global i32 5
diff --git a/test/CodeGen/CBackend/2003-06-28-LinkOnceGlobalVars.llx b/test/CodeGen/CBackend/2003-06-28-LinkOnceGlobalVars.llx
deleted file mode 100644 (file)
index ef3b579..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-; RUN: llvm-as < %s | llc -march=c | grep common | grep X
-
-@X = linkonce global i32 5
diff --git a/test/CodeGen/CBackend/2004-02-13-FrameReturnAddress.ll b/test/CodeGen/CBackend/2004-02-13-FrameReturnAddress.ll
new file mode 100644 (file)
index 0000000..911d6d4
--- /dev/null
@@ -0,0 +1,16 @@
+; RUN: llvm-as < %s | llc -march=c | grep builtin_return_address
+
+declare i8* @llvm.returnaddress(i32)
+
+declare i8* @llvm.frameaddress(i32)
+
+define i8* @test1() {
+        %X = call i8* @llvm.returnaddress( i32 0 )              ; <i8*> [#uses=1]
+        ret i8* %X
+}
+
+define i8* @test2() {
+        %X = call i8* @llvm.frameaddress( i32 0 )               ; <i8*> [#uses=1]
+        ret i8* %X
+}
+
diff --git a/test/CodeGen/CBackend/2004-02-13-FrameReturnAddress.llx b/test/CodeGen/CBackend/2004-02-13-FrameReturnAddress.llx
deleted file mode 100644 (file)
index 911d6d4..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-; RUN: llvm-as < %s | llc -march=c | grep builtin_return_address
-
-declare i8* @llvm.returnaddress(i32)
-
-declare i8* @llvm.frameaddress(i32)
-
-define i8* @test1() {
-        %X = call i8* @llvm.returnaddress( i32 0 )              ; <i8*> [#uses=1]
-        ret i8* %X
-}
-
-define i8* @test2() {
-        %X = call i8* @llvm.frameaddress( i32 0 )               ; <i8*> [#uses=1]
-        ret i8* %X
-}
-
diff --git a/test/CodeGen/CBackend/2004-02-15-PreexistingExternals.ll b/test/CodeGen/CBackend/2004-02-15-PreexistingExternals.ll
new file mode 100644 (file)
index 0000000..1629deb
--- /dev/null
@@ -0,0 +1,18 @@
+; The intrinsic lowering pass was lowering intrinsics like llvm.memcpy to 
+; explicitly specified prototypes, inserting a new function if the old one
+; didn't exist.  This caused there to be two external memcpy functions in 
+; this testcase for example, which caused the CBE to mangle one, screwing
+; everything up.  :(  Test that this does not happen anymore.
+;
+; RUN: llvm-as < %s | llc -march=c | not grep _memcpy
+
+declare void @llvm.memcpy.i32(i8*, i8*, i32, i32)
+
+declare float* @memcpy(i32*, i32, i32)
+
+define i32 @test(i8* %A, i8* %B, i32* %C) {
+        call float* @memcpy( i32* %C, i32 4, i32 17 )           ; <float*>:1 [#uses=0]
+        call void @llvm.memcpy.i32( i8* %A, i8* %B, i32 123, i32 14 )
+        ret i32 7
+}
+
diff --git a/test/CodeGen/CBackend/2004-02-15-PreexistingExternals.llx b/test/CodeGen/CBackend/2004-02-15-PreexistingExternals.llx
deleted file mode 100644 (file)
index 1629deb..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-; The intrinsic lowering pass was lowering intrinsics like llvm.memcpy to 
-; explicitly specified prototypes, inserting a new function if the old one
-; didn't exist.  This caused there to be two external memcpy functions in 
-; this testcase for example, which caused the CBE to mangle one, screwing
-; everything up.  :(  Test that this does not happen anymore.
-;
-; RUN: llvm-as < %s | llc -march=c | not grep _memcpy
-
-declare void @llvm.memcpy.i32(i8*, i8*, i32, i32)
-
-declare float* @memcpy(i32*, i32, i32)
-
-define i32 @test(i8* %A, i8* %B, i32* %C) {
-        call float* @memcpy( i32* %C, i32 4, i32 17 )           ; <float*>:1 [#uses=0]
-        call void @llvm.memcpy.i32( i8* %A, i8* %B, i32 123, i32 14 )
-        ret i32 7
-}
-
diff --git a/test/CodeGen/CBackend/2004-02-26-FPNotPrintableConstants.ll b/test/CodeGen/CBackend/2004-02-26-FPNotPrintableConstants.ll
new file mode 100644 (file)
index 0000000..6f23915
--- /dev/null
@@ -0,0 +1,11 @@
+; This is a non-normal FP value
+; RUN: llvm-as < %s | llc -march=c | grep FPConstant | grep static
+
+define float @func() {
+        ret float 0xFFF0000000000000
+}
+
+define double @func2() {
+        ret double 0xFF20000000000000
+}
+
diff --git a/test/CodeGen/CBackend/2004-02-26-FPNotPrintableConstants.llx b/test/CodeGen/CBackend/2004-02-26-FPNotPrintableConstants.llx
deleted file mode 100644 (file)
index 6f23915..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-; This is a non-normal FP value
-; RUN: llvm-as < %s | llc -march=c | grep FPConstant | grep static
-
-define float @func() {
-        ret float 0xFFF0000000000000
-}
-
-define double @func2() {
-        ret double 0xFF20000000000000
-}
-
diff --git a/test/CodeGen/CBackend/2004-02-26-LinkOnceFunctions.ll b/test/CodeGen/CBackend/2004-02-26-LinkOnceFunctions.ll
new file mode 100644 (file)
index 0000000..2d62231
--- /dev/null
@@ -0,0 +1,6 @@
+; RUN: llvm-as < %s | llc -march=c | grep func1 | grep WEAK
+
+define linkonce i32 @func1() {
+        ret i32 5
+}
+
diff --git a/test/CodeGen/CBackend/2004-02-26-LinkOnceFunctions.llx b/test/CodeGen/CBackend/2004-02-26-LinkOnceFunctions.llx
deleted file mode 100644 (file)
index 2d62231..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-; RUN: llvm-as < %s | llc -march=c | grep func1 | grep WEAK
-
-define linkonce i32 @func1() {
-        ret i32 5
-}
-
diff --git a/test/CodeGen/CBackend/2004-11-13-FunctionPointerCast.ll b/test/CodeGen/CBackend/2004-11-13-FunctionPointerCast.ll
new file mode 100644 (file)
index 0000000..a8ee438
--- /dev/null
@@ -0,0 +1,12 @@
+; The CBE should not emit code that casts the function pointer.  This causes
+; GCC to get testy and insert trap instructions instead of doing the right
+; thing. :(
+; RUN: llvm-as < %s | llc -march=c
+
+declare void @external(i8*)
+
+define i32 @test(i32* %X) {
+        %RV = call i32 bitcast (void (i8*)* @external to i32 (i32*)*)( i32* %X )                ; <i32> [#uses=1]
+        ret i32 %RV
+}
+
diff --git a/test/CodeGen/CBackend/2004-11-13-FunctionPointerCast.llx b/test/CodeGen/CBackend/2004-11-13-FunctionPointerCast.llx
deleted file mode 100644 (file)
index a8ee438..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-; The CBE should not emit code that casts the function pointer.  This causes
-; GCC to get testy and insert trap instructions instead of doing the right
-; thing. :(
-; RUN: llvm-as < %s | llc -march=c
-
-declare void @external(i8*)
-
-define i32 @test(i32* %X) {
-        %RV = call i32 bitcast (void (i8*)* @external to i32 (i32*)*)( i32* %X )                ; <i32> [#uses=1]
-        ret i32 %RV
-}
-
diff --git a/test/CodeGen/Generic/2004-02-08-UnwindSupport.ll b/test/CodeGen/Generic/2004-02-08-UnwindSupport.ll
new file mode 100644 (file)
index 0000000..10d4069
--- /dev/null
@@ -0,0 +1,17 @@
+; RUN: llvm-as < %s | llc -enable-correct-eh-support
+
+define i32 @test() {
+        unwind
+}
+
+define i32 @main() {
+        %X = invoke i32 @test( )
+                        to label %cont unwind label %EH         ; <i32> [#uses=0]
+
+cont:           ; preds = %0
+        ret i32 1
+
+EH:             ; preds = %0
+        ret i32 0
+}
+
diff --git a/test/CodeGen/Generic/2004-02-08-UnwindSupport.llx b/test/CodeGen/Generic/2004-02-08-UnwindSupport.llx
deleted file mode 100644 (file)
index 10d4069..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-; RUN: llvm-as < %s | llc -enable-correct-eh-support
-
-define i32 @test() {
-        unwind
-}
-
-define i32 @main() {
-        %X = invoke i32 @test( )
-                        to label %cont unwind label %EH         ; <i32> [#uses=0]
-
-cont:           ; preds = %0
-        ret i32 1
-
-EH:             ; preds = %0
-        ret i32 0
-}
-
diff --git a/test/CodeGen/Generic/2004-05-09-LiveVarPartialRegister.ll b/test/CodeGen/Generic/2004-05-09-LiveVarPartialRegister.ll
new file mode 100644 (file)
index 0000000..1f58ce1
--- /dev/null
@@ -0,0 +1,13 @@
+; RUN: llvm-as < %s | llc
+@global_long_1 = linkonce global i64 7          ; <i64*> [#uses=1]
+@global_long_2 = linkonce global i64 49         ; <i64*> [#uses=1]
+
+define i32 @main() {
+        %l1 = load i64* @global_long_1          ; <i64> [#uses=1]
+        %l2 = load i64* @global_long_2          ; <i64> [#uses=1]
+        %cond = icmp sle i64 %l1, %l2           ; <i1> [#uses=1]
+        %cast2 = zext i1 %cond to i32           ; <i32> [#uses=1]
+        %RV = sub i32 1, %cast2         ; <i32> [#uses=1]
+        ret i32 %RV
+}
+
diff --git a/test/CodeGen/Generic/2004-05-09-LiveVarPartialRegister.llx b/test/CodeGen/Generic/2004-05-09-LiveVarPartialRegister.llx
deleted file mode 100644 (file)
index 1f58ce1..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-; RUN: llvm-as < %s | llc
-@global_long_1 = linkonce global i64 7          ; <i64*> [#uses=1]
-@global_long_2 = linkonce global i64 49         ; <i64*> [#uses=1]
-
-define i32 @main() {
-        %l1 = load i64* @global_long_1          ; <i64> [#uses=1]
-        %l2 = load i64* @global_long_2          ; <i64> [#uses=1]
-        %cond = icmp sle i64 %l1, %l2           ; <i1> [#uses=1]
-        %cast2 = zext i1 %cond to i32           ; <i32> [#uses=1]
-        %RV = sub i32 1, %cast2         ; <i32> [#uses=1]
-        ret i32 %RV
-}
-
diff --git a/test/CodeGen/Generic/BasicInstrs.ll b/test/CodeGen/Generic/BasicInstrs.ll
new file mode 100644 (file)
index 0000000..e65cbf7
--- /dev/null
@@ -0,0 +1,54 @@
+; New testcase, this contains a bunch of simple instructions that should be
+; handled by a code generator.
+
+; RUN: llvm-as < %s | llc
+
+define i32 @add(i32 %A, i32 %B) {
+       %R = add i32 %A, %B             ; <i32> [#uses=1]
+       ret i32 %R
+}
+
+define i32 @sub(i32 %A, i32 %B) {
+       %R = sub i32 %A, %B             ; <i32> [#uses=1]
+       ret i32 %R
+}
+
+define i32 @mul(i32 %A, i32 %B) {
+       %R = mul i32 %A, %B             ; <i32> [#uses=1]
+       ret i32 %R
+}
+
+define i32 @sdiv(i32 %A, i32 %B) {
+       %R = sdiv i32 %A, %B            ; <i32> [#uses=1]
+       ret i32 %R
+}
+
+define i32 @udiv(i32 %A, i32 %B) {
+       %R = udiv i32 %A, %B            ; <i32> [#uses=1]
+       ret i32 %R
+}
+
+define i32 @srem(i32 %A, i32 %B) {
+       %R = srem i32 %A, %B            ; <i32> [#uses=1]
+       ret i32 %R
+}
+
+define i32 @urem(i32 %A, i32 %B) {
+       %R = urem i32 %A, %B            ; <i32> [#uses=1]
+       ret i32 %R
+}
+
+define i32 @and(i32 %A, i32 %B) {
+       %R = and i32 %A, %B             ; <i32> [#uses=1]
+       ret i32 %R
+}
+
+define i32 @or(i32 %A, i32 %B) {
+       %R = or i32 %A, %B              ; <i32> [#uses=1]
+       ret i32 %R
+}
+
+define i32 @xor(i32 %A, i32 %B) {
+       %R = xor i32 %A, %B             ; <i32> [#uses=1]
+       ret i32 %R
+}
diff --git a/test/CodeGen/Generic/BasicInstrs.llx b/test/CodeGen/Generic/BasicInstrs.llx
deleted file mode 100644 (file)
index e65cbf7..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-; New testcase, this contains a bunch of simple instructions that should be
-; handled by a code generator.
-
-; RUN: llvm-as < %s | llc
-
-define i32 @add(i32 %A, i32 %B) {
-       %R = add i32 %A, %B             ; <i32> [#uses=1]
-       ret i32 %R
-}
-
-define i32 @sub(i32 %A, i32 %B) {
-       %R = sub i32 %A, %B             ; <i32> [#uses=1]
-       ret i32 %R
-}
-
-define i32 @mul(i32 %A, i32 %B) {
-       %R = mul i32 %A, %B             ; <i32> [#uses=1]
-       ret i32 %R
-}
-
-define i32 @sdiv(i32 %A, i32 %B) {
-       %R = sdiv i32 %A, %B            ; <i32> [#uses=1]
-       ret i32 %R
-}
-
-define i32 @udiv(i32 %A, i32 %B) {
-       %R = udiv i32 %A, %B            ; <i32> [#uses=1]
-       ret i32 %R
-}
-
-define i32 @srem(i32 %A, i32 %B) {
-       %R = srem i32 %A, %B            ; <i32> [#uses=1]
-       ret i32 %R
-}
-
-define i32 @urem(i32 %A, i32 %B) {
-       %R = urem i32 %A, %B            ; <i32> [#uses=1]
-       ret i32 %R
-}
-
-define i32 @and(i32 %A, i32 %B) {
-       %R = and i32 %A, %B             ; <i32> [#uses=1]
-       ret i32 %R
-}
-
-define i32 @or(i32 %A, i32 %B) {
-       %R = or i32 %A, %B              ; <i32> [#uses=1]
-       ret i32 %R
-}
-
-define i32 @xor(i32 %A, i32 %B) {
-       %R = xor i32 %A, %B             ; <i32> [#uses=1]
-       ret i32 %R
-}
diff --git a/test/CodeGen/Generic/ConstantExprLowering.ll b/test/CodeGen/Generic/ConstantExprLowering.ll
new file mode 100644 (file)
index 0000000..d265415
--- /dev/null
@@ -0,0 +1,22 @@
+; RUN: llvm-as < %s | llc
+
+@.str_1 = internal constant [16 x i8] c"%d %d %d %d %d\0A\00"           ; <[16 x i8]*> [#uses=1]
+@XA = external global i32               ; <i32*> [#uses=1]
+@XB = external global i32               ; <i32*> [#uses=1]
+
+declare i32 @printf(i8*, ...)
+
+define void @test(i32 %A, i32 %B, i32 %C, i32 %D) {
+entry:
+        %t1 = icmp slt i32 %A, 0                ; <i1> [#uses=1]
+        br i1 %t1, label %less, label %not_less
+
+less:           ; preds = %entry
+        br label %not_less
+
+not_less:               ; preds = %less, %entry
+        %t2 = phi i32 [ sub (i32 ptrtoint (i32* @XA to i32), i32 ptrtoint (i32* @XB to i32)), %less ], [ sub (i32 ptrtoint (i32* @XA to i32), i32 ptrtoint (i32* @XB to i32)), %entry ]               ; <i32> [#uses=1]
+        %tmp.39 = call i32 (i8*, ...)* @printf( i8* getelementptr ([16 x i8]* @.str_1, i64 0, i64 0), i32 %t2 )      ; <i32> [#uses=0]
+        ret void
+}
+
diff --git a/test/CodeGen/Generic/ConstantExprLowering.llx b/test/CodeGen/Generic/ConstantExprLowering.llx
deleted file mode 100644 (file)
index d265415..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-; RUN: llvm-as < %s | llc
-
-@.str_1 = internal constant [16 x i8] c"%d %d %d %d %d\0A\00"           ; <[16 x i8]*> [#uses=1]
-@XA = external global i32               ; <i32*> [#uses=1]
-@XB = external global i32               ; <i32*> [#uses=1]
-
-declare i32 @printf(i8*, ...)
-
-define void @test(i32 %A, i32 %B, i32 %C, i32 %D) {
-entry:
-        %t1 = icmp slt i32 %A, 0                ; <i1> [#uses=1]
-        br i1 %t1, label %less, label %not_less
-
-less:           ; preds = %entry
-        br label %not_less
-
-not_less:               ; preds = %less, %entry
-        %t2 = phi i32 [ sub (i32 ptrtoint (i32* @XA to i32), i32 ptrtoint (i32* @XB to i32)), %less ], [ sub (i32 ptrtoint (i32* @XA to i32), i32 ptrtoint (i32* @XB to i32)), %entry ]               ; <i32> [#uses=1]
-        %tmp.39 = call i32 (i8*, ...)* @printf( i8* getelementptr ([16 x i8]* @.str_1, i64 0, i64 0), i32 %t2 )      ; <i32> [#uses=0]
-        ret void
-}
-
diff --git a/test/CodeGen/X86/2002-12-23-LocalRAProblem.ll b/test/CodeGen/X86/2002-12-23-LocalRAProblem.ll
new file mode 100644 (file)
index 0000000..df4a8f5
--- /dev/null
@@ -0,0 +1,15 @@
+; RUN: llvm-as < %s | llc -march=x86 -regalloc=simple
+
+define i32 @main() {
+       ; %A = 0
+        %A = add i32 0, 0              ; <i32> [#uses=1]
+        ; %B = 1
+       %B = add i32 0, 1               ; <i32> [#uses=2]
+       br label %bb1
+bb1:           ; preds = %0
+        ; %X = 0*1 = 0
+       %X = mul i32 %A, %B             ; <i32> [#uses=0]
+        ; %r = 0
+       %R = sub i32 %B, 1              ; <i32> [#uses=1]
+       ret i32 %R
+}
diff --git a/test/CodeGen/X86/2002-12-23-LocalRAProblem.llx b/test/CodeGen/X86/2002-12-23-LocalRAProblem.llx
deleted file mode 100644 (file)
index df4a8f5..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-; RUN: llvm-as < %s | llc -march=x86 -regalloc=simple
-
-define i32 @main() {
-       ; %A = 0
-        %A = add i32 0, 0              ; <i32> [#uses=1]
-        ; %B = 1
-       %B = add i32 0, 1               ; <i32> [#uses=2]
-       br label %bb1
-bb1:           ; preds = %0
-        ; %X = 0*1 = 0
-       %X = mul i32 %A, %B             ; <i32> [#uses=0]
-        ; %r = 0
-       %R = sub i32 %B, 1              ; <i32> [#uses=1]
-       ret i32 %R
-}
diff --git a/test/CodeGen/X86/2002-12-23-SubProblem.ll b/test/CodeGen/X86/2002-12-23-SubProblem.ll
new file mode 100644 (file)
index 0000000..68200ff
--- /dev/null
@@ -0,0 +1,7 @@
+; RUN: llvm-as < %s | llc -march=x86 -regalloc=simple
+
+define i32 @main(i32 %B) {
+        ;%B = add i32 0, 1;
+        %R = sub i32 %B, 1 ; %r = 0
+        ret i32 %R
+}
diff --git a/test/CodeGen/X86/2002-12-23-SubProblem.llx b/test/CodeGen/X86/2002-12-23-SubProblem.llx
deleted file mode 100644 (file)
index 68200ff..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-; RUN: llvm-as < %s | llc -march=x86 -regalloc=simple
-
-define i32 @main(i32 %B) {
-        ;%B = add i32 0, 1;
-        %R = sub i32 %B, 1 ; %r = 0
-        ret i32 %R
-}
diff --git a/test/CodeGen/X86/2003-08-03-CallArgLiveRanges.ll b/test/CodeGen/X86/2003-08-03-CallArgLiveRanges.ll
new file mode 100644 (file)
index 0000000..2b4242a
--- /dev/null
@@ -0,0 +1,18 @@
+; The old instruction selector used to load all arguments to a call up in 
+; registers, then start pushing them all onto the stack.  This is bad news as
+; it makes a ton of annoying overlapping live ranges.  This code should not
+; cause spills!
+;
+; RUN: llvm-as < %s | llc -march=x86 -stats |& not grep spilled
+
+target datalayout = "e-p:32:32"
+
+define i32 @test(i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) {
+        ret i32 0
+}
+
+define i32 @main() {
+        %X = call i32 @test( i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10 )            ; <i32> [#uses=1]
+        ret i32 %X
+}
+
diff --git a/test/CodeGen/X86/2003-08-03-CallArgLiveRanges.llx b/test/CodeGen/X86/2003-08-03-CallArgLiveRanges.llx
deleted file mode 100644 (file)
index 2b4242a..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-; The old instruction selector used to load all arguments to a call up in 
-; registers, then start pushing them all onto the stack.  This is bad news as
-; it makes a ton of annoying overlapping live ranges.  This code should not
-; cause spills!
-;
-; RUN: llvm-as < %s | llc -march=x86 -stats |& not grep spilled
-
-target datalayout = "e-p:32:32"
-
-define i32 @test(i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) {
-        ret i32 0
-}
-
-define i32 @main() {
-        %X = call i32 @test( i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10 )            ; <i32> [#uses=1]
-        ret i32 %X
-}
-
diff --git a/test/CodeGen/X86/2003-08-23-DeadBlockTest.ll b/test/CodeGen/X86/2003-08-23-DeadBlockTest.ll
new file mode 100644 (file)
index 0000000..a4d5589
--- /dev/null
@@ -0,0 +1,12 @@
+; RUN: llvm-as < %s | llc -march=x86
+
+define i32 @test() {
+entry:
+        ret i32 7
+Test:           ; No predecessors!
+        %A = call i32 @test( )          ; <i32> [#uses=1]
+        %B = call i32 @test( )          ; <i32> [#uses=1]
+        %C = add i32 %A, %B             ; <i32> [#uses=1]
+        ret i32 %C
+}
+
diff --git a/test/CodeGen/X86/2003-08-23-DeadBlockTest.llx b/test/CodeGen/X86/2003-08-23-DeadBlockTest.llx
deleted file mode 100644 (file)
index a4d5589..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-; RUN: llvm-as < %s | llc -march=x86
-
-define i32 @test() {
-entry:
-        ret i32 7
-Test:           ; No predecessors!
-        %A = call i32 @test( )          ; <i32> [#uses=1]
-        %B = call i32 @test( )          ; <i32> [#uses=1]
-        %C = add i32 %A, %B             ; <i32> [#uses=1]
-        ret i32 %C
-}
-
diff --git a/test/CodeGen/X86/2003-11-03-GlobalBool.ll b/test/CodeGen/X86/2003-11-03-GlobalBool.ll
new file mode 100644 (file)
index 0000000..4de3c79
--- /dev/null
@@ -0,0 +1,4 @@
+; RUN: llvm-as < %s | llc -march=x86 | \
+; RUN:   not grep {.byte\[\[:space:\]\]*true}
+
+@X = global i1 true             ; <i1*> [#uses=0]
diff --git a/test/CodeGen/X86/2003-11-03-GlobalBool.llx b/test/CodeGen/X86/2003-11-03-GlobalBool.llx
deleted file mode 100644 (file)
index 4de3c79..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-; RUN: llvm-as < %s | llc -march=x86 | \
-; RUN:   not grep {.byte\[\[:space:\]\]*true}
-
-@X = global i1 true             ; <i1*> [#uses=0]
diff --git a/test/CodeGen/X86/2004-02-12-Memcpy.ll b/test/CodeGen/X86/2004-02-12-Memcpy.ll
new file mode 100644 (file)
index 0000000..59364c1
--- /dev/null
@@ -0,0 +1,25 @@
+; RUN: llvm-as < %s | llc -march=x86 -mtriple=i686-pc-linux-gnu | grep movs | count 3
+
+@A = global [32 x i32] zeroinitializer
+@B = global [32 x i32] zeroinitializer
+
+declare void @llvm.memcpy.i32(i8*, i8*, i32, i32)
+
+define void @main() {
+  ; dword copy
+  call void @llvm.memcpy.i32(i8* bitcast ([32 x i32]* @A to i8*),
+                           i8* bitcast ([32 x i32]* @B to i8*),
+                           i32 128, i32 4 )
+
+  ; word copy
+  call void @llvm.memcpy.i32( i8* bitcast ([32 x i32]* @A to i8*),
+                           i8* bitcast ([32 x i32]* @B to i8*),
+                           i32 128, i32 2 )
+
+  ; byte copy
+  call void @llvm.memcpy.i32( i8* bitcast ([32 x i32]* @A to i8*),
+                           i8* bitcast ([32 x i32]* @B to i8*),
+                            i32 128, i32 1 )
+
+  ret void
+}
diff --git a/test/CodeGen/X86/2004-02-12-Memcpy.llx b/test/CodeGen/X86/2004-02-12-Memcpy.llx
deleted file mode 100644 (file)
index 59364c1..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-; RUN: llvm-as < %s | llc -march=x86 -mtriple=i686-pc-linux-gnu | grep movs | count 3
-
-@A = global [32 x i32] zeroinitializer
-@B = global [32 x i32] zeroinitializer
-
-declare void @llvm.memcpy.i32(i8*, i8*, i32, i32)
-
-define void @main() {
-  ; dword copy
-  call void @llvm.memcpy.i32(i8* bitcast ([32 x i32]* @A to i8*),
-                           i8* bitcast ([32 x i32]* @B to i8*),
-                           i32 128, i32 4 )
-
-  ; word copy
-  call void @llvm.memcpy.i32( i8* bitcast ([32 x i32]* @A to i8*),
-                           i8* bitcast ([32 x i32]* @B to i8*),
-                           i32 128, i32 2 )
-
-  ; byte copy
-  call void @llvm.memcpy.i32( i8* bitcast ([32 x i32]* @A to i8*),
-                           i8* bitcast ([32 x i32]* @B to i8*),
-                            i32 128, i32 1 )
-
-  ret void
-}
diff --git a/test/CodeGen/X86/2004-02-13-FrameReturnAddress.ll b/test/CodeGen/X86/2004-02-13-FrameReturnAddress.ll
new file mode 100644 (file)
index 0000000..f48b1d3
--- /dev/null
@@ -0,0 +1,16 @@
+; RUN: llvm-as < %s | llc -march=x86 | grep {(%esp}
+
+declare i8* @llvm.returnaddress(i32)
+
+declare i8* @llvm.frameaddress(i32)
+
+define i8* @test1() {
+        %X = call i8* @llvm.returnaddress( i32 0 )              ; <i8*> [#uses=1]
+        ret i8* %X
+}
+
+define i8* @test2() {
+        %X = call i8* @llvm.frameaddress( i32 0 )               ; <i8*> [#uses=1]
+        ret i8* %X
+}
+
diff --git a/test/CodeGen/X86/2004-02-13-FrameReturnAddress.llx b/test/CodeGen/X86/2004-02-13-FrameReturnAddress.llx
deleted file mode 100644 (file)
index f48b1d3..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-; RUN: llvm-as < %s | llc -march=x86 | grep {(%esp}
-
-declare i8* @llvm.returnaddress(i32)
-
-declare i8* @llvm.frameaddress(i32)
-
-define i8* @test1() {
-        %X = call i8* @llvm.returnaddress( i32 0 )              ; <i8*> [#uses=1]
-        ret i8* %X
-}
-
-define i8* @test2() {
-        %X = call i8* @llvm.frameaddress( i32 0 )               ; <i8*> [#uses=1]
-        ret i8* %X
-}
-
diff --git a/test/CodeGen/X86/2004-02-14-InefficientStackPointer.ll b/test/CodeGen/X86/2004-02-14-InefficientStackPointer.ll
new file mode 100644 (file)
index 0000000..b25dfaf
--- /dev/null
@@ -0,0 +1,5 @@
+; RUN: llvm-as < %s | llc -march=x86 | grep -i ESP | not grep sub
+
+define i32 @test(i32 %X) {
+        ret i32 %X
+}
diff --git a/test/CodeGen/X86/2004-02-14-InefficientStackPointer.llx b/test/CodeGen/X86/2004-02-14-InefficientStackPointer.llx
deleted file mode 100644 (file)
index b25dfaf..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-; RUN: llvm-as < %s | llc -march=x86 | grep -i ESP | not grep sub
-
-define i32 @test(i32 %X) {
-        ret i32 %X
-}
diff --git a/test/CodeGen/X86/2004-02-22-Casts.ll b/test/CodeGen/X86/2004-02-22-Casts.ll
new file mode 100644 (file)
index 0000000..40d5f39
--- /dev/null
@@ -0,0 +1,12 @@
+; RUN: llvm-as < %s | llc -march=x86
+define i1 @test1(double %X) {
+        %V = fcmp one double %X, 0.000000e+00           ; <i1> [#uses=1]
+        ret i1 %V
+}
+
+define double @test2(i64 %X) {
+        %V = uitofp i64 %X to double            ; <double> [#uses=1]
+        ret double %V
+}
+
+
diff --git a/test/CodeGen/X86/2004-02-22-Casts.llx b/test/CodeGen/X86/2004-02-22-Casts.llx
deleted file mode 100644 (file)
index 40d5f39..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-; RUN: llvm-as < %s | llc -march=x86
-define i1 @test1(double %X) {
-        %V = fcmp one double %X, 0.000000e+00           ; <i1> [#uses=1]
-        ret i1 %V
-}
-
-define double @test2(i64 %X) {
-        %V = uitofp i64 %X to double            ; <double> [#uses=1]
-        ret double %V
-}
-
-
diff --git a/test/CodeGen/X86/2004-03-30-Select-Max.ll b/test/CodeGen/X86/2004-03-30-Select-Max.ll
new file mode 100644 (file)
index 0000000..5021fd8
--- /dev/null
@@ -0,0 +1,8 @@
+; RUN: llvm-as < %s | llc -march=x86 | not grep {j\[lgbe\]}
+
+define i32 @max(i32 %A, i32 %B) {
+        %gt = icmp sgt i32 %A, %B               ; <i1> [#uses=1]
+        %R = select i1 %gt, i32 %A, i32 %B              ; <i32> [#uses=1]
+        ret i32 %R
+}
+
diff --git a/test/CodeGen/X86/2004-03-30-Select-Max.llx b/test/CodeGen/X86/2004-03-30-Select-Max.llx
deleted file mode 100644 (file)
index 5021fd8..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-; RUN: llvm-as < %s | llc -march=x86 | not grep {j\[lgbe\]}
-
-define i32 @max(i32 %A, i32 %B) {
-        %gt = icmp sgt i32 %A, %B               ; <i1> [#uses=1]
-        %R = select i1 %gt, i32 %A, i32 %B              ; <i32> [#uses=1]
-        ret i32 %R
-}
-
diff --git a/test/CodeGen/X86/2004-04-09-SameValueCoalescing.ll b/test/CodeGen/X86/2004-04-09-SameValueCoalescing.ll
new file mode 100644 (file)
index 0000000..633a615
--- /dev/null
@@ -0,0 +1,13 @@
+; Linear scan does not currently coalesce any two variables that have
+; overlapping live intervals. When two overlapping intervals have the same
+; value, they can be joined though.
+;
+; RUN: llvm-as < %s | llc -march=x86 -regalloc=linearscan | \
+; RUN:   not grep {mov %\[A-Z\]\\\{2,3\\\}, %\[A-Z\]\\\{2,3\\\}}
+
+define i64 @test(i64 %x) {
+entry:
+        %tmp.1 = mul i64 %x, 4294967297         ; <i64> [#uses=1]
+        ret i64 %tmp.1
+}
+
diff --git a/test/CodeGen/X86/2004-04-09-SameValueCoalescing.llx b/test/CodeGen/X86/2004-04-09-SameValueCoalescing.llx
deleted file mode 100644 (file)
index 633a615..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-; Linear scan does not currently coalesce any two variables that have
-; overlapping live intervals. When two overlapping intervals have the same
-; value, they can be joined though.
-;
-; RUN: llvm-as < %s | llc -march=x86 -regalloc=linearscan | \
-; RUN:   not grep {mov %\[A-Z\]\\\{2,3\\\}, %\[A-Z\]\\\{2,3\\\}}
-
-define i64 @test(i64 %x) {
-entry:
-        %tmp.1 = mul i64 %x, 4294967297         ; <i64> [#uses=1]
-        ret i64 %tmp.1
-}
-
diff --git a/test/CodeGen/X86/2004-04-13-FPCMOV-Crash.ll b/test/CodeGen/X86/2004-04-13-FPCMOV-Crash.ll
new file mode 100644 (file)
index 0000000..858605c
--- /dev/null
@@ -0,0 +1,7 @@
+; RUN: llvm-as < %s | llc -march=x86
+
+define double @test(double %d) {
+        %X = select i1 false, double %d, double %d              ; <double> [#uses=1]
+        ret double %X
+}
+
diff --git a/test/CodeGen/X86/2004-04-13-FPCMOV-Crash.llx b/test/CodeGen/X86/2004-04-13-FPCMOV-Crash.llx
deleted file mode 100644 (file)
index 858605c..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-; RUN: llvm-as < %s | llc -march=x86
-
-define double @test(double %d) {
-        %X = select i1 false, double %d, double %d              ; <double> [#uses=1]
-        ret double %X
-}
-
diff --git a/test/CodeGen/X86/2004-06-10-StackifierCrash.ll b/test/CodeGen/X86/2004-06-10-StackifierCrash.ll
new file mode 100644 (file)
index 0000000..1a51bee
--- /dev/null
@@ -0,0 +1,6 @@
+; RUN: llvm-as < %s | llc -march=x86
+
+define i1 @T(double %X) {
+        %V = fcmp oeq double %X, %X             ; <i1> [#uses=1]
+        ret i1 %V
+}
diff --git a/test/CodeGen/X86/2004-06-10-StackifierCrash.llx b/test/CodeGen/X86/2004-06-10-StackifierCrash.llx
deleted file mode 100644 (file)
index 1a51bee..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-; RUN: llvm-as < %s | llc -march=x86
-
-define i1 @T(double %X) {
-        %V = fcmp oeq double %X, %X             ; <i1> [#uses=1]
-        ret i1 %V
-}
diff --git a/test/CodeGen/X86/2004-10-08-SelectSetCCFold.ll b/test/CodeGen/X86/2004-10-08-SelectSetCCFold.ll
new file mode 100644 (file)
index 0000000..9ee773c
--- /dev/null
@@ -0,0 +1,8 @@
+; RUN: llvm-as < %s | llc -march=x86
+
+define i1 @test(i1 %C, i1 %D, i32 %X, i32 %Y) {
+        %E = icmp slt i32 %X, %Y                ; <i1> [#uses=1]
+        %F = select i1 %C, i1 %D, i1 %E         ; <i1> [#uses=1]
+        ret i1 %F
+}
+
diff --git a/test/CodeGen/X86/2004-10-08-SelectSetCCFold.llx b/test/CodeGen/X86/2004-10-08-SelectSetCCFold.llx
deleted file mode 100644 (file)
index 9ee773c..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-; RUN: llvm-as < %s | llc -march=x86
-
-define i1 @test(i1 %C, i1 %D, i32 %X, i32 %Y) {
-        %E = icmp slt i32 %X, %Y                ; <i1> [#uses=1]
-        %F = select i1 %C, i1 %D, i1 %E         ; <i1> [#uses=1]
-        ret i1 %F
-}
-
diff --git a/test/CodeGen/X86/compare_folding.ll b/test/CodeGen/X86/compare_folding.ll
new file mode 100644 (file)
index 0000000..c6cda4a
--- /dev/null
@@ -0,0 +1,11 @@
+; RUN: llvm-as < %s | llc -march=x86 -mcpu=yonah | \
+; RUN:   grep movsd | count 1
+; RUN: llvm-as < %s | llc -march=x86 -mcpu=yonah | \
+; RUN:   grep ucomisd
+declare i1 @llvm.isunordered.f64(double, double)
+
+define i1 @test1(double %X, double %Y) {
+        %COM = fcmp uno double %X, %Y           ; <i1> [#uses=1]
+        ret i1 %COM
+}
+
diff --git a/test/CodeGen/X86/compare_folding.llx b/test/CodeGen/X86/compare_folding.llx
deleted file mode 100644 (file)
index c6cda4a..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-; RUN: llvm-as < %s | llc -march=x86 -mcpu=yonah | \
-; RUN:   grep movsd | count 1
-; RUN: llvm-as < %s | llc -march=x86 -mcpu=yonah | \
-; RUN:   grep ucomisd
-declare i1 @llvm.isunordered.f64(double, double)
-
-define i1 @test1(double %X, double %Y) {
-        %COM = fcmp uno double %X, %Y           ; <i1> [#uses=1]
-        ret i1 %COM
-}
-
diff --git a/test/CodeGen/X86/fp_constant_op.ll b/test/CodeGen/X86/fp_constant_op.ll
new file mode 100644 (file)
index 0000000..ed02c6a
--- /dev/null
@@ -0,0 +1,35 @@
+; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel -mcpu=i486 | \
+; RUN:   grep {fadd\\|fsub\\|fdiv\\|fmul} | not grep -i ST
+
+; Test that the load of the constant is folded into the operation.
+
+
+define double @foo_add(double %P) {
+       %tmp.1 = add double %P, 1.230000e+02            ; <double> [#uses=1]
+       ret double %tmp.1
+}
+
+define double @foo_mul(double %P) {
+       %tmp.1 = mul double %P, 1.230000e+02            ; <double> [#uses=1]
+       ret double %tmp.1
+}
+
+define double @foo_sub(double %P) {
+       %tmp.1 = sub double %P, 1.230000e+02            ; <double> [#uses=1]
+       ret double %tmp.1
+}
+
+define double @foo_subr(double %P) {
+       %tmp.1 = sub double 1.230000e+02, %P            ; <double> [#uses=1]
+       ret double %tmp.1
+}
+
+define double @foo_div(double %P) {
+       %tmp.1 = fdiv double %P, 1.230000e+02           ; <double> [#uses=1]
+       ret double %tmp.1
+}
+
+define double @foo_divr(double %P) {
+       %tmp.1 = fdiv double 1.230000e+02, %P           ; <double> [#uses=1]
+       ret double %tmp.1
+}
diff --git a/test/CodeGen/X86/fp_constant_op.llx b/test/CodeGen/X86/fp_constant_op.llx
deleted file mode 100644 (file)
index ed02c6a..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel -mcpu=i486 | \
-; RUN:   grep {fadd\\|fsub\\|fdiv\\|fmul} | not grep -i ST
-
-; Test that the load of the constant is folded into the operation.
-
-
-define double @foo_add(double %P) {
-       %tmp.1 = add double %P, 1.230000e+02            ; <double> [#uses=1]
-       ret double %tmp.1
-}
-
-define double @foo_mul(double %P) {
-       %tmp.1 = mul double %P, 1.230000e+02            ; <double> [#uses=1]
-       ret double %tmp.1
-}
-
-define double @foo_sub(double %P) {
-       %tmp.1 = sub double %P, 1.230000e+02            ; <double> [#uses=1]
-       ret double %tmp.1
-}
-
-define double @foo_subr(double %P) {
-       %tmp.1 = sub double 1.230000e+02, %P            ; <double> [#uses=1]
-       ret double %tmp.1
-}
-
-define double @foo_div(double %P) {
-       %tmp.1 = fdiv double %P, 1.230000e+02           ; <double> [#uses=1]
-       ret double %tmp.1
-}
-
-define double @foo_divr(double %P) {
-       %tmp.1 = fdiv double 1.230000e+02, %P           ; <double> [#uses=1]
-       ret double %tmp.1
-}
diff --git a/test/CodeGen/X86/fp_load_cast_fold.ll b/test/CodeGen/X86/fp_load_cast_fold.ll
new file mode 100644 (file)
index 0000000..5452326
--- /dev/null
@@ -0,0 +1,20 @@
+; RUN: llvm-as < %s | llc -march=x86 | grep fild | not grep ESP
+
+define double @short(i16* %P) {
+        %V = load i16* %P               ; <i16> [#uses=1]
+        %V2 = sitofp i16 %V to double           ; <double> [#uses=1]
+        ret double %V2
+}
+
+define double @int(i32* %P) {
+        %V = load i32* %P               ; <i32> [#uses=1]
+        %V2 = sitofp i32 %V to double           ; <double> [#uses=1]
+        ret double %V2
+}
+
+define double @long(i64* %P) {
+        %V = load i64* %P               ; <i64> [#uses=1]
+        %V2 = sitofp i64 %V to double           ; <double> [#uses=1]
+        ret double %V2
+}
+
diff --git a/test/CodeGen/X86/fp_load_cast_fold.llx b/test/CodeGen/X86/fp_load_cast_fold.llx
deleted file mode 100644 (file)
index 5452326..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-; RUN: llvm-as < %s | llc -march=x86 | grep fild | not grep ESP
-
-define double @short(i16* %P) {
-        %V = load i16* %P               ; <i16> [#uses=1]
-        %V2 = sitofp i16 %V to double           ; <double> [#uses=1]
-        ret double %V2
-}
-
-define double @int(i32* %P) {
-        %V = load i32* %P               ; <i32> [#uses=1]
-        %V2 = sitofp i32 %V to double           ; <double> [#uses=1]
-        ret double %V2
-}
-
-define double @long(i64* %P) {
-        %V = load i64* %P               ; <i64> [#uses=1]
-        %V2 = sitofp i64 %V to double           ; <double> [#uses=1]
-        ret double %V2
-}
-
diff --git a/test/CodeGen/X86/fp_load_fold.ll b/test/CodeGen/X86/fp_load_fold.ll
new file mode 100644 (file)
index 0000000..7c33cb3
--- /dev/null
@@ -0,0 +1,40 @@
+; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel | \
+; RUN:   grep -i ST | not grep {fadd\\|fsub\\|fdiv\\|fmul}
+
+; Test that the load of the memory location is folded into the operation.
+
+define double @test_add(double %X, double* %P) {
+       %Y = load double* %P            ; <double> [#uses=1]
+       %R = add double %X, %Y          ; <double> [#uses=1]
+       ret double %R
+}
+
+define double @test_mul(double %X, double* %P) {
+       %Y = load double* %P            ; <double> [#uses=1]
+       %R = mul double %X, %Y          ; <double> [#uses=1]
+       ret double %R
+}
+
+define double @test_sub(double %X, double* %P) {
+       %Y = load double* %P            ; <double> [#uses=1]
+       %R = sub double %X, %Y          ; <double> [#uses=1]
+       ret double %R
+}
+
+define double @test_subr(double %X, double* %P) {
+       %Y = load double* %P            ; <double> [#uses=1]
+       %R = sub double %Y, %X          ; <double> [#uses=1]
+       ret double %R
+}
+
+define double @test_div(double %X, double* %P) {
+       %Y = load double* %P            ; <double> [#uses=1]
+       %R = fdiv double %X, %Y         ; <double> [#uses=1]
+       ret double %R
+}
+
+define double @test_divr(double %X, double* %P) {
+       %Y = load double* %P            ; <double> [#uses=1]
+       %R = fdiv double %Y, %X         ; <double> [#uses=1]
+       ret double %R
+}
diff --git a/test/CodeGen/X86/fp_load_fold.llx b/test/CodeGen/X86/fp_load_fold.llx
deleted file mode 100644 (file)
index 7c33cb3..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel | \
-; RUN:   grep -i ST | not grep {fadd\\|fsub\\|fdiv\\|fmul}
-
-; Test that the load of the memory location is folded into the operation.
-
-define double @test_add(double %X, double* %P) {
-       %Y = load double* %P            ; <double> [#uses=1]
-       %R = add double %X, %Y          ; <double> [#uses=1]
-       ret double %R
-}
-
-define double @test_mul(double %X, double* %P) {
-       %Y = load double* %P            ; <double> [#uses=1]
-       %R = mul double %X, %Y          ; <double> [#uses=1]
-       ret double %R
-}
-
-define double @test_sub(double %X, double* %P) {
-       %Y = load double* %P            ; <double> [#uses=1]
-       %R = sub double %X, %Y          ; <double> [#uses=1]
-       ret double %R
-}
-
-define double @test_subr(double %X, double* %P) {
-       %Y = load double* %P            ; <double> [#uses=1]
-       %R = sub double %Y, %X          ; <double> [#uses=1]
-       ret double %R
-}
-
-define double @test_div(double %X, double* %P) {
-       %Y = load double* %P            ; <double> [#uses=1]
-       %R = fdiv double %X, %Y         ; <double> [#uses=1]
-       ret double %R
-}
-
-define double @test_divr(double %X, double* %P) {
-       %Y = load double* %P            ; <double> [#uses=1]
-       %R = fdiv double %Y, %X         ; <double> [#uses=1]
-       ret double %R
-}
diff --git a/test/CodeGen/X86/shift-double.ll b/test/CodeGen/X86/shift-double.ll
new file mode 100644 (file)
index 0000000..24017fe
--- /dev/null
@@ -0,0 +1,41 @@
+; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel | \
+; RUN:   grep {sh\[lr\]d} | count 5
+
+define i64 @test1(i64 %X, i8 %C) {
+        %shift.upgrd.1 = zext i8 %C to i64              ; <i64> [#uses=1]
+        %Y = shl i64 %X, %shift.upgrd.1         ; <i64> [#uses=1]
+        ret i64 %Y
+}
+
+define i64 @test2(i64 %X, i8 %C) {
+        %shift.upgrd.2 = zext i8 %C to i64              ; <i64> [#uses=1]
+        %Y = ashr i64 %X, %shift.upgrd.2                ; <i64> [#uses=1]
+        ret i64 %Y
+}
+
+define i64 @test3(i64 %X, i8 %C) {
+        %shift.upgrd.3 = zext i8 %C to i64              ; <i64> [#uses=1]
+        %Y = lshr i64 %X, %shift.upgrd.3                ; <i64> [#uses=1]
+        ret i64 %Y
+}
+
+define i32 @test4(i32 %A, i32 %B, i8 %C) {
+        %shift.upgrd.4 = zext i8 %C to i32              ; <i32> [#uses=1]
+        %X = shl i32 %A, %shift.upgrd.4         ; <i32> [#uses=1]
+        %Cv = sub i8 32, %C             ; <i8> [#uses=1]
+        %shift.upgrd.5 = zext i8 %Cv to i32             ; <i32> [#uses=1]
+        %Y = lshr i32 %B, %shift.upgrd.5                ; <i32> [#uses=1]
+        %Z = or i32 %Y, %X              ; <i32> [#uses=1]
+        ret i32 %Z
+}
+
+define i16 @test5(i16 %A, i16 %B, i8 %C) {
+        %shift.upgrd.6 = zext i8 %C to i16              ; <i16> [#uses=1]
+        %X = shl i16 %A, %shift.upgrd.6         ; <i16> [#uses=1]
+        %Cv = sub i8 16, %C             ; <i8> [#uses=1]
+        %shift.upgrd.7 = zext i8 %Cv to i16             ; <i16> [#uses=1]
+        %Y = lshr i16 %B, %shift.upgrd.7                ; <i16> [#uses=1]
+        %Z = or i16 %Y, %X              ; <i16> [#uses=1]
+        ret i16 %Z
+}
+
diff --git a/test/CodeGen/X86/shift-double.llx b/test/CodeGen/X86/shift-double.llx
deleted file mode 100644 (file)
index 24017fe..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel | \
-; RUN:   grep {sh\[lr\]d} | count 5
-
-define i64 @test1(i64 %X, i8 %C) {
-        %shift.upgrd.1 = zext i8 %C to i64              ; <i64> [#uses=1]
-        %Y = shl i64 %X, %shift.upgrd.1         ; <i64> [#uses=1]
-        ret i64 %Y
-}
-
-define i64 @test2(i64 %X, i8 %C) {
-        %shift.upgrd.2 = zext i8 %C to i64              ; <i64> [#uses=1]
-        %Y = ashr i64 %X, %shift.upgrd.2                ; <i64> [#uses=1]
-        ret i64 %Y
-}
-
-define i64 @test3(i64 %X, i8 %C) {
-        %shift.upgrd.3 = zext i8 %C to i64              ; <i64> [#uses=1]
-        %Y = lshr i64 %X, %shift.upgrd.3                ; <i64> [#uses=1]
-        ret i64 %Y
-}
-
-define i32 @test4(i32 %A, i32 %B, i8 %C) {
-        %shift.upgrd.4 = zext i8 %C to i32              ; <i32> [#uses=1]
-        %X = shl i32 %A, %shift.upgrd.4         ; <i32> [#uses=1]
-        %Cv = sub i8 32, %C             ; <i8> [#uses=1]
-        %shift.upgrd.5 = zext i8 %Cv to i32             ; <i32> [#uses=1]
-        %Y = lshr i32 %B, %shift.upgrd.5                ; <i32> [#uses=1]
-        %Z = or i32 %Y, %X              ; <i32> [#uses=1]
-        ret i32 %Z
-}
-
-define i16 @test5(i16 %A, i16 %B, i8 %C) {
-        %shift.upgrd.6 = zext i8 %C to i16              ; <i16> [#uses=1]
-        %X = shl i16 %A, %shift.upgrd.6         ; <i16> [#uses=1]
-        %Cv = sub i8 16, %C             ; <i8> [#uses=1]
-        %shift.upgrd.7 = zext i8 %Cv to i16             ; <i16> [#uses=1]
-        %Y = lshr i16 %B, %shift.upgrd.7                ; <i16> [#uses=1]
-        %Z = or i16 %Y, %X              ; <i16> [#uses=1]
-        ret i16 %Z
-}
-