Changeset View
Changeset View
Standalone View
Standalone View
llvm/test/Analysis/CostModel/ARM/intrinsic-cost-kinds.ll
Show All 37 Lines | |||||
; THRU-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void | ; THRU-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void | ||||
; | ; | ||||
; LATE-LABEL: 'smax' | ; LATE-LABEL: 'smax' | ||||
; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s = call i32 @llvm.smax.i32(i32 %a, i32 %b) | ; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s = call i32 @llvm.smax.i32(i32 %a, i32 %b) | ||||
; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v = call <16 x i32> @llvm.smax.v16i32(<16 x i32> %va, <16 x i32> %vb) | ; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v = call <16 x i32> @llvm.smax.v16i32(<16 x i32> %va, <16 x i32> %vb) | ||||
; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | ; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | ||||
; | ; | ||||
; SIZE-LABEL: 'smax' | ; SIZE-LABEL: 'smax' | ||||
; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s = call i32 @llvm.smax.i32(i32 %a, i32 %b) | ; SIZE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %s = call i32 @llvm.smax.i32(i32 %a, i32 %b) | ||||
; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v = call <16 x i32> @llvm.smax.v16i32(<16 x i32> %va, <16 x i32> %vb) | ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v = call <16 x i32> @llvm.smax.v16i32(<16 x i32> %va, <16 x i32> %vb) | ||||
; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | ||||
; | ; | ||||
; SIZE_LATE-LABEL: 'smax' | ; SIZE_LATE-LABEL: 'smax' | ||||
; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s = call i32 @llvm.smax.i32(i32 %a, i32 %b) | ; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s = call i32 @llvm.smax.i32(i32 %a, i32 %b) | ||||
; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v = call <16 x i32> @llvm.smax.v16i32(<16 x i32> %va, <16 x i32> %vb) | ; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v = call <16 x i32> @llvm.smax.v16i32(<16 x i32> %va, <16 x i32> %vb) | ||||
; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | ; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | ||||
; | ; | ||||
%s = call i32 @llvm.smax.i32(i32 %a, i32 %b) | %s = call i32 @llvm.smax.i32(i32 %a, i32 %b) | ||||
%v = call <16 x i32> @llvm.smax.v16i32(<16 x i32> %va, <16 x i32> %vb) | %v = call <16 x i32> @llvm.smax.v16i32(<16 x i32> %va, <16 x i32> %vb) | ||||
ret void | ret void | ||||
} | } | ||||
define void @fmuladd(float %a, float %b, float %c, <16 x float> %va, <16 x float> %vb, <16 x float> %vc) { | define void @fmuladd(float %a, float %b, float %c, <16 x float> %va, <16 x float> %vb, <16 x float> %vc) { | ||||
; THRU-LABEL: 'fmuladd' | ; THRU-LABEL: 'fmuladd' | ||||
; THRU-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s = call float @llvm.fmuladd.f32(float %a, float %b, float %c) | ; THRU-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s = call float @llvm.fmuladd.f32(float %a, float %b, float %c) | ||||
; THRU-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v = call <16 x float> @llvm.fmuladd.v16f32(<16 x float> %va, <16 x float> %vb, <16 x float> %vc) | ; THRU-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v = call <16 x float> @llvm.fmuladd.v16f32(<16 x float> %va, <16 x float> %vb, <16 x float> %vc) | ||||
; THRU-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void | ; THRU-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void | ||||
; | ; | ||||
; LATE-LABEL: 'fmuladd' | ; LATE-LABEL: 'fmuladd' | ||||
; LATE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %s = call float @llvm.fmuladd.f32(float %a, float %b, float %c) | ; LATE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %s = call float @llvm.fmuladd.f32(float %a, float %b, float %c) | ||||
; LATE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v = call <16 x float> @llvm.fmuladd.v16f32(<16 x float> %va, <16 x float> %vb, <16 x float> %vc) | ; LATE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v = call <16 x float> @llvm.fmuladd.v16f32(<16 x float> %va, <16 x float> %vb, <16 x float> %vc) | ||||
; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | ; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | ||||
; | ; | ||||
; SIZE-LABEL: 'fmuladd' | ; SIZE-LABEL: 'fmuladd' | ||||
; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s = call float @llvm.fmuladd.f32(float %a, float %b, float %c) | ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s = call float @llvm.fmuladd.f32(float %a, float %b, float %c) | ||||
; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v = call <16 x float> @llvm.fmuladd.v16f32(<16 x float> %va, <16 x float> %vb, <16 x float> %vc) | ; SIZE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v = call <16 x float> @llvm.fmuladd.v16f32(<16 x float> %va, <16 x float> %vb, <16 x float> %vc) | ||||
; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | ||||
; | ; | ||||
; SIZE_LATE-LABEL: 'fmuladd' | ; SIZE_LATE-LABEL: 'fmuladd' | ||||
; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s = call float @llvm.fmuladd.f32(float %a, float %b, float %c) | ; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s = call float @llvm.fmuladd.f32(float %a, float %b, float %c) | ||||
; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v = call <16 x float> @llvm.fmuladd.v16f32(<16 x float> %va, <16 x float> %vb, <16 x float> %vc) | ; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v = call <16 x float> @llvm.fmuladd.v16f32(<16 x float> %va, <16 x float> %vb, <16 x float> %vc) | ||||
; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | ; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | ||||
; | ; | ||||
%s = call float @llvm.fmuladd.f32(float %a, float %b, float %c) | %s = call float @llvm.fmuladd.f32(float %a, float %b, float %c) | ||||
%v = call <16 x float> @llvm.fmuladd.v16f32(<16 x float> %va, <16 x float> %vb, <16 x float> %vc) | %v = call <16 x float> @llvm.fmuladd.v16f32(<16 x float> %va, <16 x float> %vb, <16 x float> %vc) | ||||
ret void | ret void | ||||
} | } | ||||
define void @cttz(i32 %a, <16 x i32> %va) { | define void @cttz(i32 %a, <16 x i32> %va) { | ||||
▲ Show 20 Lines • Show All 160 Lines • Show Last 20 Lines |