[llvm-commits] [llvm] r93669 - in /llvm/trunk/test/Transforms/InstCombine: fsub-fadd.ll fsub-fsub.ll fsub.ll
Bill Wendling
isanbard at gmail.com
Sat Jan 16 16:21:21 PST 2010
Author: void
Date: Sat Jan 16 18:21:21 2010
New Revision: 93669
URL: http://llvm.org/viewvc/llvm-project?rev=93669&view=rev
Log:
Reduce fsub-fadd.ll and merge it into fsub-fsub.ll. Rename fsub-fsub.ll to
fsub.ll and FileCheckify it.
Added:
llvm/trunk/test/Transforms/InstCombine/fsub.ll
- copied, changed from r93635, llvm/trunk/test/Transforms/InstCombine/fsub-fsub.ll
Removed:
llvm/trunk/test/Transforms/InstCombine/fsub-fadd.ll
llvm/trunk/test/Transforms/InstCombine/fsub-fsub.ll
Removed: llvm/trunk/test/Transforms/InstCombine/fsub-fadd.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/fsub-fadd.ll?rev=93668&view=auto
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/fsub-fadd.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/fsub-fadd.ll (removed)
@@ -1,39 +0,0 @@
-; RUN: opt < %s -instcombine -S | FileCheck %s
-; <rdar://problem/7530098>
-
-define void @func(double* %rhi, double* %rlo, double %xh, double %xl, double %yh, double %yl) nounwind ssp {
-entry:
- %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
- %tmp = fmul double %xh, 0x41A0000002000000 ; <double> [#uses=2]
- %tmp1 = fsub double %xh, %tmp ; <double> [#uses=1]
- %tmp2 = fadd double %tmp1, %tmp ; <double> [#uses=3]
- %tmp3 = fsub double %xh, %tmp2 ; <double> [#uses=2]
- %tmp4 = fmul double %yh, 0x41A0000002000000 ; <double> [#uses=2]
- %tmp5 = fsub double %yh, %tmp4 ; <double> [#uses=1]
- %tmp6 = fadd double %tmp5, %tmp4 ; <double> [#uses=3]
- %tmp7 = fsub double %yh, %tmp6 ; <double> [#uses=2]
- %tmp8 = fmul double %xh, %yh ; <double> [#uses=3]
- %tmp9 = fmul double %tmp2, %tmp6 ; <double> [#uses=1]
- %tmp10 = fsub double %tmp9, %tmp8 ; <double> [#uses=1]
- %tmp11 = fmul double %tmp2, %tmp7 ; <double> [#uses=1]
- %tmp12 = fadd double %tmp10, %tmp11 ; <double> [#uses=1]
- %tmp13 = fmul double %tmp3, %tmp6 ; <double> [#uses=1]
- %tmp14 = fadd double %tmp12, %tmp13 ; <double> [#uses=1]
- %tmp15 = fmul double %tmp3, %tmp7 ; <double> [#uses=1]
- %tmp16 = fadd double %tmp14, %tmp15 ; <double> [#uses=1]
- %tmp17 = fmul double %xh, %yl ; <double> [#uses=1]
- %tmp18 = fmul double %xl, %yh ; <double> [#uses=1]
- %tmp19 = fadd double %tmp17, %tmp18 ; <double> [#uses=1]
- %tmp20 = fadd double %tmp19, %tmp16 ; <double> [#uses=2]
- %tmp21 = fadd double %tmp8, %tmp20 ; <double> [#uses=1]
- store double %tmp21, double* %rhi, align 8
- %tmp22 = load double* %rhi, align 8 ; <double> [#uses=1]
- %tmp23 = fsub double %tmp8, %tmp22 ; <double> [#uses=1]
- %tmp24 = fadd double %tmp23, %tmp20 ; <double> [#uses=1]
-
-; CHECK: %tmp23 = fsub double %tmp8, %tmp21
-; CHECK: %tmp24 = fadd double %tmp23, %tmp20
-
- store double %tmp24, double* %rlo, align 8
- ret void
-}
Removed: llvm/trunk/test/Transforms/InstCombine/fsub-fsub.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/fsub-fsub.ll?rev=93668&view=auto
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/fsub-fsub.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/fsub-fsub.ll (removed)
@@ -1,8 +0,0 @@
-; RUN: opt < %s -instcombine -S | grep fsub | count 2
-; PR4374
-
-define float @func(float %a, float %b) nounwind {
- %tmp3 = fsub float %a, %b
- %tmp4 = fsub float -0.000000e+00, %tmp3
- ret float %tmp4
-}
Copied: llvm/trunk/test/Transforms/InstCombine/fsub.ll (from r93635, llvm/trunk/test/Transforms/InstCombine/fsub-fsub.ll)
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/fsub.ll?p2=llvm/trunk/test/Transforms/InstCombine/fsub.ll&p1=llvm/trunk/test/Transforms/InstCombine/fsub-fsub.ll&r1=93635&r2=93669&rev=93669&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/fsub-fsub.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/fsub.ll Sat Jan 16 18:21:21 2010
@@ -1,8 +1,23 @@
-; RUN: opt < %s -instcombine -S | grep fsub | count 2
+; RUN: opt < %s -instcombine -S | FileCheck %s
+
; PR4374
+define float @test1(float %a, float %b) nounwind {
+ %t1 = fsub float %a, %b
+ %t2 = fsub float -0.000000e+00, %t1
+
+; CHECK: %t1 = fsub float %a, %b
+; CHECK-NEXT: %t2 = fsub float -0.000000e+00, %t1
+
+ ret float %t2
+}
+
+; <rdar://problem/7530098>
+define double @test2(double %x, double %y) nounwind {
+ %t1 = fadd double %x, %y
+ %t2 = fsub double %x, %t1
+
+; CHECK: %t1 = fadd double %x, %y
+; CHECK-NEXT: %t2 = fsub double %x, %t1
-define float @func(float %a, float %b) nounwind {
- %tmp3 = fsub float %a, %b
- %tmp4 = fsub float -0.000000e+00, %tmp3
- ret float %tmp4
+ ret double %t2
}
More information about the llvm-commits
mailing list