[llvm] r368211 - [NFC][LICM] Pre-commit test for unary FNeg support in LICM.
Cameron McInally via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 7 14:30:00 PDT 2019
Author: mcinally
Date: Wed Aug 7 14:30:00 2019
New Revision: 368211
URL: http://llvm.org/viewvc/llvm-project?rev=368211&view=rev
Log:
[NFC][LICM] Pre-commit test for unary FNeg support in LICM.
Modified:
llvm/trunk/test/Transforms/LICM/hoisting.ll
Modified: llvm/trunk/test/Transforms/LICM/hoisting.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LICM/hoisting.ll?rev=368211&r1=368210&r2=368211&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/LICM/hoisting.ll (original)
+++ llvm/trunk/test/Transforms/LICM/hoisting.ll Wed Aug 7 14:30:00 2019
@@ -126,6 +126,29 @@ ifend:
ret { i32*, i32 } %d
}
+; CHECK: define void @test6(float %f)
+; CHECK: call
+; CHECK: fneg
+; CHECK: call
+define void @test6(float %f) #2 {
+entry:
+ br label %for.body
+
+for.body: ; preds = %for.body, %entry
+ %i = phi i32 [ 0, %entry ], [ %inc, %for.body ]
+ call void @foo_may_call_exit(i32 0)
+ %neg = fneg float %f
+ call void @use(float %neg)
+ %inc = add nsw i32 %i, 1
+ %cmp = icmp slt i32 %inc, 10000
+ br i1 %cmp, label %for.body, label %for.end
+
+for.end: ; preds = %for.body
+ ret void
+}
+
+declare void @use(float)
+
; CHECK: define i32 @hoist_bitreverse(i32 %0)
; CHECK: bitreverse
; CHECK: br label %header
More information about the llvm-commits
mailing list