From: Daniel Berlin Date: Mon, 6 Mar 2017 20:01:31 +0000 (+0000) Subject: NewGVN: We were not really failing this testcase, because the instructions it was... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9517d55719ee561adee2e9e4b0edc268a9d5029f;p=llvm 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297058 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Transforms/NewGVN/2011-07-07-MatchIntrinsicExtract.ll b/test/Transforms/NewGVN/2011-07-07-MatchIntrinsicExtract.ll index 4b47b06f165..86c80d1d5f2 100644 --- a/test/Transforms/NewGVN/2011-07-07-MatchIntrinsicExtract.ll +++ b/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(