summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2016-03-25 18:01:23 +0000
committerSanjay Patel <spatel@rotateright.com>2016-03-25 18:01:23 +0000
commit8f22390137732852d97c4a88206ed06e191727b2 (patch)
treefb556b000e69a5a056fdf692d337533c8ff8677f
parent52707469781e185e27de6fb921570dfe1b309379 (diff)
downloadbcm5719-llvm-8f22390137732852d97c4a88206ed06e191727b2.tar.gz
bcm5719-llvm-8f22390137732852d97c4a88206ed06e191727b2.zip
[InstCombine] use FileCheck for better checking
(testing script for autogeneration of check lines) llvm-svn: 264431
-rw-r--r--llvm/test/Transforms/InstCombine/zero-point-zero-add.ll11
1 files changed, 10 insertions, 1 deletions
diff --git a/llvm/test/Transforms/InstCombine/zero-point-zero-add.ll b/llvm/test/Transforms/InstCombine/zero-point-zero-add.ll
index d07a9f4b9de..4cdeb407a71 100644
--- a/llvm/test/Transforms/InstCombine/zero-point-zero-add.ll
+++ b/llvm/test/Transforms/InstCombine/zero-point-zero-add.ll
@@ -1,14 +1,23 @@
-; RUN: opt < %s -instcombine -S | grep 0.0 | count 1
+; NOTE: Assertions have been autogenerated by update_test_checks.py
+; RUN: opt < %s -instcombine -S | FileCheck %s
declare double @abs(double)
define double @test(double %X) {
+; CHECK-LABEL: @test(
+; CHECK: [[Y:%.*]] = fadd double %X, 0.000000e+00
+; CHECK-NEXT: ret double [[Y]]
+;
%Y = fadd double %X, 0.0 ;; Should be a single add x, 0.0
%Z = fadd double %Y, 0.0
ret double %Z
}
define double @test1(double %X) {
+; CHECK-LABEL: @test1(
+; CHECK: [[Y:%.*]] = call double @abs(double %X)
+; CHECK-NEXT: ret double [[Y]]
+;
%Y = call double @abs(double %X)
%Z = fadd double %Y, 0.0
ret double %Z
OpenPOWER on IntegriCloud