[llvm] 9300de4 - [InstSimplify] add test with nobuiltin attribute (PR46627); NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 14 07:04:41 PDT 2020
Author: Sanjay Patel
Date: 2020-07-14T10:04:24-04:00
New Revision: 9300de4d1cd151828ab2548c242d34d6ad9124d4
URL: https://github.com/llvm/llvm-project/commit/9300de4d1cd151828ab2548c242d34d6ad9124d4
DIFF: https://github.com/llvm/llvm-project/commit/9300de4d1cd151828ab2548c242d34d6ad9124d4.diff
LOG: [InstSimplify] add test with nobuiltin attribute (PR46627); NFC
Added:
Modified:
llvm/test/Transforms/InstSimplify/call.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/InstSimplify/call.ll b/llvm/test/Transforms/InstSimplify/call.ll
index 9d0147b5ba52..019def569f15 100644
--- a/llvm/test/Transforms/InstSimplify/call.ll
+++ b/llvm/test/Transforms/InstSimplify/call.ll
@@ -1038,3 +1038,19 @@ define i32 @call_undef_musttail() {
%x = musttail call i32 undef()
ret i32 %x
}
+
+; FIXME: This is not the builtin fmax, so we don't know anything about its behavior.
+
+define float @nobuiltin_fmax() {
+; CHECK-LABEL: @nobuiltin_fmax(
+; CHECK-NEXT: [[M:%.*]] = call float @fmaxf(float 0.000000e+00, float 1.000000e+00) #3
+; CHECK-NEXT: ret float [[M]]
+;
+ %m = call float @fmaxf(float 0.0, float 1.0) #0
+ %r = call float @llvm.fabs.f32(float %m)
+ ret float %r
+}
+
+declare float @fmaxf(float, float)
+
+attributes #0 = { nobuiltin readnone }
More information about the llvm-commits
mailing list