[llvm] r264431 - [InstCombine] use FileCheck for better checking

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 25 11:01:24 PDT 2016


Author: spatel
Date: Fri Mar 25 13:01:23 2016
New Revision: 264431

URL: http://llvm.org/viewvc/llvm-project?rev=264431&view=rev
Log:
[InstCombine] use FileCheck for better checking

(testing script for autogeneration of check lines)


Modified:
    llvm/trunk/test/Transforms/InstCombine/zero-point-zero-add.ll

Modified: llvm/trunk/test/Transforms/InstCombine/zero-point-zero-add.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/zero-point-zero-add.ll?rev=264431&r1=264430&r2=264431&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/zero-point-zero-add.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/zero-point-zero-add.ll Fri Mar 25 13:01:23 2016
@@ -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




More information about the llvm-commits mailing list