Changeset View
Changeset View
Standalone View
Standalone View
llvm/test/Transforms/Scalarizer/intrinsics.ll
Show All 21 Lines | |||||
; Binary int plus constant scalar operand | ; Binary int plus constant scalar operand | ||||
declare <2 x i32> @llvm.smul.fix.sat.v2i32(<2 x i32>, <2 x i32>, i32) | declare <2 x i32> @llvm.smul.fix.sat.v2i32(<2 x i32>, <2 x i32>, i32) | ||||
declare <2 x i32> @llvm.umul.fix.sat.v2i32(<2 x i32>, <2 x i32>, i32) | declare <2 x i32> @llvm.umul.fix.sat.v2i32(<2 x i32>, <2 x i32>, i32) | ||||
declare <2 x i32> @llvm.fptosi.sat.v2i32.v2f32(<2 x float>) | declare <2 x i32> @llvm.fptosi.sat.v2i32.v2f32(<2 x float>) | ||||
declare <2 x i32> @llvm.fptoui.sat.v2i32.v2f32(<2 x float>) | declare <2 x i32> @llvm.fptoui.sat.v2i32.v2f32(<2 x float>) | ||||
; Unary fp plus constant scalar operand, plus non-overloaded return type | |||||
declare <2 x i1> @llvm.is.fpclass.v2f32(<2 x float>, i32) | |||||
; CHECK-LABEL: @scalarize_sqrt_v2f32( | ; CHECK-LABEL: @scalarize_sqrt_v2f32( | ||||
; CHECK: %sqrt.i0 = call float @llvm.sqrt.f32(float %x.i0) | ; CHECK: %sqrt.i0 = call float @llvm.sqrt.f32(float %x.i0) | ||||
; CHECK: %sqrt.i1 = call float @llvm.sqrt.f32(float %x.i1) | ; CHECK: %sqrt.i1 = call float @llvm.sqrt.f32(float %x.i1) | ||||
; CHECK: %sqrt.upto0 = insertelement <2 x float> poison, float %sqrt.i0, i32 0 | ; CHECK: %sqrt.upto0 = insertelement <2 x float> poison, float %sqrt.i0, i32 0 | ||||
; CHECK: %sqrt = insertelement <2 x float> %sqrt.upto0, float %sqrt.i1, i32 1 | ; CHECK: %sqrt = insertelement <2 x float> %sqrt.upto0, float %sqrt.i1, i32 1 | ||||
; CHECK: ret <2 x float> %sqrt | ; CHECK: ret <2 x float> %sqrt | ||||
define <2 x float> @scalarize_sqrt_v2f32(<2 x float> %x) #0 { | define <2 x float> @scalarize_sqrt_v2f32(<2 x float> %x) #0 { | ||||
▲ Show 20 Lines • Show All 116 Lines • ▼ Show 20 Lines | |||||
; CHECK: %sat.i1 = call i32 @llvm.fptoui.sat.i32.f32(float %x.i1) | ; CHECK: %sat.i1 = call i32 @llvm.fptoui.sat.i32.f32(float %x.i1) | ||||
; CHECK: %sat.upto0 = insertelement <2 x i32> poison, i32 %sat.i0, i32 0 | ; CHECK: %sat.upto0 = insertelement <2 x i32> poison, i32 %sat.i0, i32 0 | ||||
; CHECK: %sat = insertelement <2 x i32> %sat.upto0, i32 %sat.i1, i32 1 | ; CHECK: %sat = insertelement <2 x i32> %sat.upto0, i32 %sat.i1, i32 1 | ||||
; CHECK: ret <2 x i32> %sat | ; CHECK: ret <2 x i32> %sat | ||||
define <2 x i32> @scalarize_fptoui_sat(<2 x float> %x) #0 { | define <2 x i32> @scalarize_fptoui_sat(<2 x float> %x) #0 { | ||||
%sat = call <2 x i32> @llvm.fptoui.sat.v2i32.v2f32(<2 x float> %x) | %sat = call <2 x i32> @llvm.fptoui.sat.v2i32.v2f32(<2 x float> %x) | ||||
ret <2 x i32> %sat | ret <2 x i32> %sat | ||||
} | } | ||||
; CHECK-LABEL: @scalarize_is_fpclass( | |||||
; CHECK: %cond.i0 = call i1 @llvm.is.fpclass.f32(float %x.i0, i32 1) | |||||
; CHECK: %cond.i1 = call i1 @llvm.is.fpclass.f32(float %x.i1, i32 1) | |||||
; CHECK: %cond.upto0 = insertelement <2 x i1> poison, i1 %cond.i0, i32 0 | |||||
; CHECK: %cond = insertelement <2 x i1> %cond.upto0, i1 %cond.i1, i32 1 | |||||
arsenm: Scalarizer is a separate patch | |||||
; CHECK: ret <2 x i1> %cond | |||||
define <2 x i1> @scalarize_is_fpclass(<2 x float> %x) { | |||||
%cond = call <2 x i1> @llvm.is.fpclass.v2f32(<2 x float> %x, i32 1) | |||||
ret <2 x i1> %cond | |||||
} |
Scalarizer is a separate patch