summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorDaniel Berlin <dberlin@dberlin.org>2017-03-06 20:01:31 +0000
committerDaniel Berlin <dberlin@dberlin.org>2017-03-06 20:01:31 +0000
commit961b002714a84b37397eda75d0958f86c4102907 (patch)
treea34eb6c5896f9ff0e14f569c50de0bfe860d2445 /llvm/test
parentb04cb9ab7a2aa138ca46920687c1504765bb80d8 (diff)
downloadbcm5719-llvm-961b002714a84b37397eda75d0958f86c4102907.tar.gz
bcm5719-llvm-961b002714a84b37397eda75d0958f86c4102907.zip
NewGVN: We were not really failing this testcase, because the instructions it was looking for are unused. GVN value numbers unused instructions, NewGVN does not. Fix the instructions to be used, so we eliminate the redundancies it's checking for, and un-XFAIL it
llvm-svn: 297058
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Transforms/NewGVN/2011-07-07-MatchIntrinsicExtract.ll19
1 files changed, 12 insertions, 7 deletions
diff --git a/llvm/test/Transforms/NewGVN/2011-07-07-MatchIntrinsicExtract.ll b/llvm/test/Transforms/NewGVN/2011-07-07-MatchIntrinsicExtract.ll
index 4b47b06f165..86c80d1d5f2 100644
--- a/llvm/test/Transforms/NewGVN/2011-07-07-MatchIntrinsicExtract.ll
+++ b/llvm/test/Transforms/NewGVN/2011-07-07-MatchIntrinsicExtract.ll
@@ -1,4 +1,3 @@
-; XFAIL: *
; RUN: opt < %s -newgvn -S | FileCheck %s
;
@@ -9,7 +8,8 @@ entry:
%uadd = tail call %0 @llvm.uadd.with.overflow.i64(i64 %a, i64 %b)
%uadd.0 = extractvalue %0 %uadd, 0
%add1 = add i64 %a, %b
- ret i64 %add1
+ %add2 = add i64 %add1, %uadd.0
+ ret i64 %add2
}
; CHECK-LABEL: @test1(
@@ -21,7 +21,8 @@ entry:
%usub = tail call %0 @llvm.usub.with.overflow.i64(i64 %a, i64 %b)
%usub.0 = extractvalue %0 %usub, 0
%sub1 = sub i64 %a, %b
- ret i64 %sub1
+ %add2 = add i64 %sub1, %usub.0
+ ret i64 %add2
}
; CHECK-LABEL: @test2(
@@ -33,7 +34,8 @@ entry:
%umul = tail call %0 @llvm.umul.with.overflow.i64(i64 %a, i64 %b)
%umul.0 = extractvalue %0 %umul, 0
%mul1 = mul i64 %a, %b
- ret i64 %mul1
+ %add2 = add i64 %mul1, %umul.0
+ ret i64 %add2
}
; CHECK-LABEL: @test3(
@@ -45,7 +47,8 @@ entry:
%sadd = tail call %0 @llvm.sadd.with.overflow.i64(i64 %a, i64 %b)
%sadd.0 = extractvalue %0 %sadd, 0
%add1 = add i64 %a, %b
- ret i64 %add1
+ %add2 = add i64 %add1, %sadd.0
+ ret i64 %add2
}
; CHECK-LABEL: @test4(
@@ -57,7 +60,8 @@ entry:
%ssub = tail call %0 @llvm.ssub.with.overflow.i64(i64 %a, i64 %b)
%ssub.0 = extractvalue %0 %ssub, 0
%sub1 = sub i64 %a, %b
- ret i64 %sub1
+ %add2 = add i64 %sub1, %ssub.0
+ ret i64 %add2
}
; CHECK-LABEL: @test5(
@@ -69,7 +73,8 @@ entry:
%smul = tail call %0 @llvm.smul.with.overflow.i64(i64 %a, i64 %b)
%smul.0 = extractvalue %0 %smul, 0
%mul1 = mul i64 %a, %b
- ret i64 %mul1
+ %add2 = add i64 %mul1, %smul.0
+ ret i64 %add2
}
; CHECK-LABEL: @test6(
OpenPOWER on IntegriCloud