[InstSimplify] add test with nobuiltin attribute (PR46627); NFC

This commit is contained in:
Sanjay Patel 2020-07-14 09:28:57 -04:00
parent 6c16fbd0ac
commit 9300de4d1c
1 changed files with 16 additions and 0 deletions

View File

@ -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 }