summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2014-01-25 01:18:18 +0000
committerHans Wennborg <hans@hanshq.net>2014-01-25 01:18:18 +0000
commit4d67a2e85a39c798faf77e79076cde827c82c237 (patch)
tree7aec992a93f2eb3a14f0998c4a755eb42d835fb0 /llvm/test
parent955231ddf6cbb54f0931b78eb6e9b3f18438b5d4 (diff)
downloadbcm5719-llvm-4d67a2e85a39c798faf77e79076cde827c82c237.tar.gz
bcm5719-llvm-4d67a2e85a39c798faf77e79076cde827c82c237.zip
Revert "Add Constant Hoisting Pass" (r200034)
This commit caused -Woverloaded-virtual warnings. The two new TargetTransformInfo::getIntImmCost functions were only added to the superclass, and to the X86 subclass. The other targets were not updated, and the warning highlighted this by pointing out that e.g. ARMTTI::getIntImmCost was hiding the two new getIntImmCost variants. We could pacify the warning by adding "using TargetTransformInfo::getIntImmCost" to the various subclasses, or turning it off, but I suspect that it's wrong to leave the functions unimplemnted in those targets. The default implementations return TCC_Free, which I don't think is right e.g. for ARM. llvm-svn: 200058
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/CodeGen/ARM/memcpy-inline.ll6
-rw-r--r--llvm/test/CodeGen/X86/large-constants.ll67
2 files changed, 2 insertions, 71 deletions
diff --git a/llvm/test/CodeGen/ARM/memcpy-inline.ll b/llvm/test/CodeGen/ARM/memcpy-inline.ll
index 14d84deea81..946c63ed40c 100644
--- a/llvm/test/CodeGen/ARM/memcpy-inline.ll
+++ b/llvm/test/CodeGen/ARM/memcpy-inline.ll
@@ -38,8 +38,7 @@ entry:
define void @t2(i8* nocapture %C) nounwind {
entry:
; CHECK-LABEL: t2:
-; CHECK: movw [[REG2:r[0-9]+]], #16716
-; CHECK: movt [[REG2:r[0-9]+]], #72
+; CHECK: ldr [[REG2:r[0-9]+]], [r1, #32]
; CHECK: str [[REG2]], [r0, #32]
; CHECK: vld1.8 {d{{[0-9]+}}, d{{[0-9]+}}}, [r1]
; CHECK: vst1.8 {d{{[0-9]+}}, d{{[0-9]+}}}, [r0]
@@ -80,8 +79,7 @@ entry:
; CHECK: strb [[REG5]], [r0, #6]
; CHECK: movw [[REG6:r[0-9]+]], #21587
; CHECK: strh [[REG6]], [r0, #4]
-; CHECK: movw [[REG7:r[0-9]+]], #18500
-; CHECK: movt [[REG7:r[0-9]+]], #22866
+; CHECK: ldr [[REG7:r[0-9]+]],
; CHECK: str [[REG7]]
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %C, i8* getelementptr inbounds ([7 x i8]* @.str5, i64 0, i64 0), i64 7, i32 1, i1 false)
ret void
diff --git a/llvm/test/CodeGen/X86/large-constants.ll b/llvm/test/CodeGen/X86/large-constants.ll
deleted file mode 100644
index 157ecc4af66..00000000000
--- a/llvm/test/CodeGen/X86/large-constants.ll
+++ /dev/null
@@ -1,67 +0,0 @@
-; RUN: llc < %s -mtriple=x86_64-darwin -mcpu=corei7 | grep movabsq | count 3
-
-define i64 @constant_hoisting(i64 %o0, i64 %o1, i64 %o2, i64 %o3, i64 %o4, i64 %o5) {
-entry:
- %l0 = and i64 %o0, -281474976710654
- %c0 = icmp ne i64 %l0, 0
- br i1 %c0, label %fail, label %bb1
-
-bb1:
- %l1 = and i64 %o1, -281474976710654
- %c1 = icmp ne i64 %l1, 0
- br i1 %c1, label %fail, label %bb2
-
-bb2:
- %l2 = and i64 %o2, -281474976710654
- %c2 = icmp ne i64 %l2, 0
- br i1 %c2, label %fail, label %bb3
-
-bb3:
- %l3 = and i64 %o3, -281474976710654
- %c3 = icmp ne i64 %l3, 0
- br i1 %c3, label %fail, label %bb4
-
-bb4:
- %l4 = and i64 %o4, -281474976710653
- %c4 = icmp ne i64 %l4, 0
- br i1 %c4, label %fail, label %bb5
-
-bb5:
- %l5 = and i64 %o5, -281474976710652
- %c5 = icmp ne i64 %l5, 0
- br i1 %c5, label %fail, label %bb6
-
-bb6:
- ret i64 %l5
-
-fail:
- ret i64 -1
-}
-
-define void @constant_expressions() {
-entry:
- %0 = load i64* inttoptr (i64 add (i64 51250129900, i64 0) to i64*)
- %1 = load i64* inttoptr (i64 add (i64 51250129900, i64 8) to i64*)
- %2 = load i64* inttoptr (i64 add (i64 51250129900, i64 16) to i64*)
- %3 = load i64* inttoptr (i64 add (i64 51250129900, i64 24) to i64*)
- %4 = add i64 %0, %1
- %5 = add i64 %2, %3
- %6 = add i64 %4, %5
- store i64 %6, i64* inttoptr (i64 add (i64 51250129900, i64 0) to i64*)
- ret void
-}
-
-
-define void @constant_expressions2() {
-entry:
- %0 = load i64* inttoptr (i64 51250129900 to i64*)
- %1 = load i64* inttoptr (i64 51250129908 to i64*)
- %2 = load i64* inttoptr (i64 51250129916 to i64*)
- %3 = load i64* inttoptr (i64 51250129924 to i64*)
- %4 = add i64 %0, %1
- %5 = add i64 %2, %3
- %6 = add i64 %4, %5
- store i64 %6, i64* inttoptr (i64 51250129900 to i64*)
- ret void
-}
-
OpenPOWER on IntegriCloud