OSDN Git Service

[ARM] preserve test intent by removing undef
authorSanjay Patel <spatel@rotateright.com>
Wed, 16 May 2018 21:57:00 +0000 (21:57 +0000)
committerSanjay Patel <spatel@rotateright.com>
Wed, 16 May 2018 21:57:00 +0000 (21:57 +0000)
We need to clean up the DAG floating-point undef logic.
This process is similar to how we handled integer undef
logic in D43141.

And as we did there, I'm trying to reduce the patch by
changing tests that would probably become meaningless
once we correct FP undef folding.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@332532 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGen/ARM/debug-info-branch-folding.ll

index 5ba2526..b3aca8c 100644 (file)
@@ -2,7 +2,7 @@
 target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:32:64-v128:32:128-a0:0:32-n32"
 target triple = "thumbv7-apple-macosx10.6.7"
 
-;CHECK:        vadd.f32        q4, q8, q8
+;CHECK:        vadd.f32        q4, q8, q9
 ;CHECK-NEXT: LBB0_1
 
 ;CHECK:         @DEBUG_VALUE: x <- $q4{{$}}
@@ -14,14 +14,14 @@ target triple = "thumbv7-apple-macosx10.6.7"
 
 declare <4 x float> @test0001(float) nounwind readnone ssp
 
-define i32 @main(i32 %argc, i8** nocapture %argv, i1 %cond) nounwind ssp !dbg !10 {
+define i32 @main(i32 %argc, i8** nocapture %argv, i1 %cond, <4 x float> %x) nounwind ssp !dbg !10 {
 entry:
   br label %for.body9
 
 for.body9:                                        ; preds = %for.body9, %entry
-  %add19 = fadd <4 x float> undef, <float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 1.000000e+00>, !dbg !39
+  %add19 = fadd <4 x float> %x, <float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 1.000000e+00>, !dbg !39
   tail call void @llvm.dbg.value(metadata <4 x float> %add19, metadata !27, metadata !DIExpression()), !dbg !39
-  %add20 = fadd <4 x float> undef, <float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 1.000000e+00>, !dbg !39
+  %add20 = fadd <4 x float> %x, <float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 1.000000e+00>, !dbg !39
   tail call void @llvm.dbg.value(metadata <4 x float> %add20, metadata !28, metadata !DIExpression()), !dbg !39
   br i1 %cond, label %for.end54, label %for.body9, !dbg !44