[InstCombine] use FileCheck for better checking
authorSanjay Patel <spatel@rotateright.com>
Fri, 25 Mar 2016 18:01:23 +0000 (18:01 +0000)
committerSanjay Patel <spatel@rotateright.com>
Fri, 25 Mar 2016 18:01:23 +0000 (18:01 +0000)
(testing script for autogeneration of check lines)

llvm-svn: 264431

llvm/test/Transforms/InstCombine/zero-point-zero-add.ll

index d07a9f4..4cdeb40 100644 (file)
@@ -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