[InstCombine] use FileCheck for better checking

(testing script for autogeneration of check lines)

llvm-svn: 264431
This commit is contained in:
Sanjay Patel 2016-03-25 18:01:23 +00:00
parent 5270746978
commit 8f22390137
1 changed files with 10 additions and 1 deletions

View 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