OSDN Git Service

[Hexagon] preserve test intent by removing undef
authorSanjay Patel <spatel@rotateright.com>
Wed, 16 May 2018 22:49:08 +0000 (22:49 +0000)
committerSanjay Patel <spatel@rotateright.com>
Wed, 16 May 2018 22:49:08 +0000 (22:49 +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@332550 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGen/Hexagon/fp_latency.ll

index 3ea1419..4934897 100644 (file)
@@ -40,15 +40,15 @@ b2:                                               ; preds = %b2, %b1
   %v15 = add nsw i32 %v14, %v11
   %v16 = getelementptr inbounds [1000 x float], [1000 x float]* %v1, i32 0, i32 %v15
   %v17 = load float, float* %v16, align 4, !tbaa !0
-  %v18 = fmul float %v17, undef
+  %v18 = fmul float %v17, %v17
   %v19 = mul nsw i32 %v13, 25
   %v20 = add nsw i32 %v19, %v11
   %v21 = getelementptr inbounds [1000 x float], [1000 x float]* %v2, i32 0, i32 %v20
   %v22 = load float, float* %v21, align 4, !tbaa !0
-  %v23 = fmul float %v22, undef
+  %v23 = fmul float %v22, %v22
   %v24 = fadd float %v18, %v23
   %v25 = load float, float* %v12, align 4, !tbaa !0
-  %v26 = fmul float %v25, undef
+  %v26 = fmul float %v25, %v25
   %v27 = fadd float %v24, %v26
   %v28 = getelementptr inbounds [1000 x float], [1000 x float]* %v0, i32 0, i32 %v20
   %v29 = load float, float* %v28, align 4, !tbaa !0