Skip to content

Commit

Permalink
[InstSimplify] add test with nobuiltin attribute (PR46627); NFC
Browse files Browse the repository at this point in the history
  • Loading branch information
rotateright committed Jul 14, 2020
1 parent 6c16fbd commit 9300de4
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions llvm/test/Transforms/InstSimplify/call.ll
Expand Up @@ -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 }

0 comments on commit 9300de4

Please sign in to comment.