blob: 500356471c9ae532e9d490e6318a70758bd0514c [file] [edit]
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 6
; RUN: opt -S -passes=inline < %s | FileCheck %s
target triple = "x86_64-unknown-linux-gnu"
; Even with alwaysinline, the callee cannot be inlined, because the target
; features are incompatible. Inlining it would result in a selection failure
; crash.
define <16 x float> @caller(<16 x float> %a, <16 x float> %b) {
; CHECK-LABEL: define <16 x float> @caller(
; CHECK-SAME: <16 x float> [[A:%.*]], <16 x float> [[B:%.*]]) {
; CHECK-NEXT: [[RES:%.*]] = call <16 x float> @callee(<16 x float> [[A]], <16 x float> [[B]]) #[[ATTR2:[0-9]+]]
; CHECK-NEXT: ret <16 x float> [[RES]]
;
%res = call <16 x float> @callee(<16 x float> %a, <16 x float> %b) alwaysinline
ret <16 x float> %res
}
define <16 x float> @callee(<16 x float> %a, <16 x float> %b) #0 {
; CHECK-LABEL: define <16 x float> @callee(
; CHECK-SAME: <16 x float> [[A:%.*]], <16 x float> [[B:%.*]]) #[[ATTR0:[0-9]+]] {
; CHECK-NEXT: [[RES:%.*]] = call <16 x float> @llvm.x86.avx512.min.ps.512(<16 x float> [[A]], <16 x float> [[B]], i32 0)
; CHECK-NEXT: ret <16 x float> [[RES]]
;
%res = call <16 x float> @llvm.x86.avx512.min.ps.512(<16 x float> %a, <16 x float> %b, i32 0)
ret <16 x float> %res
}
declare <16 x float> @llvm.x86.avx512.min.ps.512(<16 x float>, <16 x float>, i32 immarg)
attributes #0 = { "target-features"="+avx512bw,+avx512dq,+avx512f" }