CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
278 lines
18 KiB
LLVM
278 lines
18 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
|
|
; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output | FileCheck %s --check-prefixes=ALL,X64
|
|
; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -mattr=+movbe | FileCheck %s --check-prefixes=ALL,X64-MOVBE
|
|
; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -mattr=+movbe,+fast-movbe | FileCheck %s --check-prefixes=ALL,X64-FASTMOVBE
|
|
|
|
; RUN: opt < %s -mtriple=i686-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output | FileCheck %s --check-prefixes=ALL,X32
|
|
; RUN: opt < %s -mtriple=i686-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -mattr=+movbe | FileCheck %s --check-prefixes=ALL,X32-MOVBE
|
|
; RUN: opt < %s -mtriple=i686-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -mattr=+movbe,+fast-movbe | FileCheck %s --check-prefixes=ALL,X32-FASTMOVBE
|
|
|
|
declare i16 @llvm.bswap.i16(i16)
|
|
declare i32 @llvm.bswap.i32(i32)
|
|
declare i64 @llvm.bswap.i64(i64)
|
|
declare i128 @llvm.bswap.i128(i128)
|
|
|
|
define void @var_bswap_store_i16(i16 %a, ptr %dst) {
|
|
; X64-LABEL: 'var_bswap_store_i16'
|
|
; X64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %bswap = call i16 @llvm.bswap.i16(i16 %a)
|
|
; X64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i16 %bswap, ptr %dst, align 1
|
|
; X64-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
|
;
|
|
; X64-MOVBE-LABEL: 'var_bswap_store_i16'
|
|
; X64-MOVBE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %bswap = call i16 @llvm.bswap.i16(i16 %a)
|
|
; X64-MOVBE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i16 %bswap, ptr %dst, align 1
|
|
; X64-MOVBE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
|
;
|
|
; X64-FASTMOVBE-LABEL: 'var_bswap_store_i16'
|
|
; X64-FASTMOVBE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %bswap = call i16 @llvm.bswap.i16(i16 %a)
|
|
; X64-FASTMOVBE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i16 %bswap, ptr %dst, align 1
|
|
; X64-FASTMOVBE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
|
;
|
|
; X32-LABEL: 'var_bswap_store_i16'
|
|
; X32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %bswap = call i16 @llvm.bswap.i16(i16 %a)
|
|
; X32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i16 %bswap, ptr %dst, align 1
|
|
; X32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
|
;
|
|
; X32-MOVBE-LABEL: 'var_bswap_store_i16'
|
|
; X32-MOVBE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %bswap = call i16 @llvm.bswap.i16(i16 %a)
|
|
; X32-MOVBE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i16 %bswap, ptr %dst, align 1
|
|
; X32-MOVBE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
|
;
|
|
; X32-FASTMOVBE-LABEL: 'var_bswap_store_i16'
|
|
; X32-FASTMOVBE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %bswap = call i16 @llvm.bswap.i16(i16 %a)
|
|
; X32-FASTMOVBE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i16 %bswap, ptr %dst, align 1
|
|
; X32-FASTMOVBE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
|
;
|
|
%bswap = call i16 @llvm.bswap.i16(i16 %a)
|
|
store i16 %bswap, ptr %dst, align 1
|
|
|
|
ret void
|
|
}
|
|
define void @var_bswap_store_i16_extrause(i16 %a, ptr %dst) {
|
|
; ALL-LABEL: 'var_bswap_store_i16_extrause'
|
|
; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %bswap = call i16 @llvm.bswap.i16(i16 %a)
|
|
; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i16 %bswap, ptr %dst, align 1
|
|
; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %bswap2 = shl i16 %bswap, 2
|
|
; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
|
;
|
|
%bswap = call i16 @llvm.bswap.i16(i16 %a)
|
|
store i16 %bswap, ptr %dst, align 1
|
|
|
|
%bswap2 = shl i16 %bswap, 2 ; incur an extra use to the bswap
|
|
|
|
ret void
|
|
}
|
|
|
|
define void @var_bswap_store_i32(i32 %a, ptr %dst) {
|
|
; X64-LABEL: 'var_bswap_store_i32'
|
|
; X64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %bswap = call i32 @llvm.bswap.i32(i32 %a)
|
|
; X64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 %bswap, ptr %dst, align 1
|
|
; X64-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
|
;
|
|
; X64-MOVBE-LABEL: 'var_bswap_store_i32'
|
|
; X64-MOVBE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %bswap = call i32 @llvm.bswap.i32(i32 %a)
|
|
; X64-MOVBE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 %bswap, ptr %dst, align 1
|
|
; X64-MOVBE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
|
;
|
|
; X64-FASTMOVBE-LABEL: 'var_bswap_store_i32'
|
|
; X64-FASTMOVBE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %bswap = call i32 @llvm.bswap.i32(i32 %a)
|
|
; X64-FASTMOVBE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 %bswap, ptr %dst, align 1
|
|
; X64-FASTMOVBE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
|
;
|
|
; X32-LABEL: 'var_bswap_store_i32'
|
|
; X32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %bswap = call i32 @llvm.bswap.i32(i32 %a)
|
|
; X32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 %bswap, ptr %dst, align 1
|
|
; X32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
|
;
|
|
; X32-MOVBE-LABEL: 'var_bswap_store_i32'
|
|
; X32-MOVBE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %bswap = call i32 @llvm.bswap.i32(i32 %a)
|
|
; X32-MOVBE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 %bswap, ptr %dst, align 1
|
|
; X32-MOVBE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
|
;
|
|
; X32-FASTMOVBE-LABEL: 'var_bswap_store_i32'
|
|
; X32-FASTMOVBE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %bswap = call i32 @llvm.bswap.i32(i32 %a)
|
|
; X32-FASTMOVBE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 %bswap, ptr %dst, align 1
|
|
; X32-FASTMOVBE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
|
;
|
|
%bswap = call i32 @llvm.bswap.i32(i32 %a)
|
|
store i32 %bswap, ptr %dst, align 1
|
|
|
|
ret void
|
|
}
|
|
define void @var_bswap_store_i32_extrause(i32 %a, ptr %dst) {
|
|
; ALL-LABEL: 'var_bswap_store_i32_extrause'
|
|
; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %bswap = call i32 @llvm.bswap.i32(i32 %a)
|
|
; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 %bswap, ptr %dst, align 1
|
|
; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %bswap2 = shl i32 %bswap, 2
|
|
; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
|
;
|
|
%bswap = call i32 @llvm.bswap.i32(i32 %a)
|
|
store i32 %bswap, ptr %dst, align 1
|
|
|
|
%bswap2 = shl i32 %bswap, 2 ; incur an extra use to the bswap
|
|
|
|
ret void
|
|
}
|
|
|
|
define void @var_bswap_store_i64(i64 %a, ptr %dst) {
|
|
; X64-LABEL: 'var_bswap_store_i64'
|
|
; X64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %bswap = call i64 @llvm.bswap.i64(i64 %a)
|
|
; X64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i64 %bswap, ptr %dst, align 1
|
|
; X64-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
|
;
|
|
; X64-MOVBE-LABEL: 'var_bswap_store_i64'
|
|
; X64-MOVBE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %bswap = call i64 @llvm.bswap.i64(i64 %a)
|
|
; X64-MOVBE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i64 %bswap, ptr %dst, align 1
|
|
; X64-MOVBE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
|
;
|
|
; X64-FASTMOVBE-LABEL: 'var_bswap_store_i64'
|
|
; X64-FASTMOVBE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %bswap = call i64 @llvm.bswap.i64(i64 %a)
|
|
; X64-FASTMOVBE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i64 %bswap, ptr %dst, align 1
|
|
; X64-FASTMOVBE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
|
;
|
|
; X32-LABEL: 'var_bswap_store_i64'
|
|
; X32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %bswap = call i64 @llvm.bswap.i64(i64 %a)
|
|
; X32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store i64 %bswap, ptr %dst, align 1
|
|
; X32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
|
;
|
|
; X32-MOVBE-LABEL: 'var_bswap_store_i64'
|
|
; X32-MOVBE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %bswap = call i64 @llvm.bswap.i64(i64 %a)
|
|
; X32-MOVBE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store i64 %bswap, ptr %dst, align 1
|
|
; X32-MOVBE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
|
;
|
|
; X32-FASTMOVBE-LABEL: 'var_bswap_store_i64'
|
|
; X32-FASTMOVBE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %bswap = call i64 @llvm.bswap.i64(i64 %a)
|
|
; X32-FASTMOVBE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store i64 %bswap, ptr %dst, align 1
|
|
; X32-FASTMOVBE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
|
;
|
|
%bswap = call i64 @llvm.bswap.i64(i64 %a)
|
|
store i64 %bswap, ptr %dst, align 1
|
|
|
|
ret void
|
|
}
|
|
define void @var_bswap_store_i64_extrause(i64 %a, ptr %dst) {
|
|
; X64-LABEL: 'var_bswap_store_i64_extrause'
|
|
; X64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %bswap = call i64 @llvm.bswap.i64(i64 %a)
|
|
; X64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i64 %bswap, ptr %dst, align 1
|
|
; X64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %bswap2 = shl i64 %bswap, 2
|
|
; X64-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
|
;
|
|
; X64-MOVBE-LABEL: 'var_bswap_store_i64_extrause'
|
|
; X64-MOVBE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %bswap = call i64 @llvm.bswap.i64(i64 %a)
|
|
; X64-MOVBE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i64 %bswap, ptr %dst, align 1
|
|
; X64-MOVBE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %bswap2 = shl i64 %bswap, 2
|
|
; X64-MOVBE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
|
;
|
|
; X64-FASTMOVBE-LABEL: 'var_bswap_store_i64_extrause'
|
|
; X64-FASTMOVBE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %bswap = call i64 @llvm.bswap.i64(i64 %a)
|
|
; X64-FASTMOVBE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i64 %bswap, ptr %dst, align 1
|
|
; X64-FASTMOVBE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %bswap2 = shl i64 %bswap, 2
|
|
; X64-FASTMOVBE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
|
;
|
|
; X32-LABEL: 'var_bswap_store_i64_extrause'
|
|
; X32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %bswap = call i64 @llvm.bswap.i64(i64 %a)
|
|
; X32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store i64 %bswap, ptr %dst, align 1
|
|
; X32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %bswap2 = shl i64 %bswap, 2
|
|
; X32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
|
;
|
|
; X32-MOVBE-LABEL: 'var_bswap_store_i64_extrause'
|
|
; X32-MOVBE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %bswap = call i64 @llvm.bswap.i64(i64 %a)
|
|
; X32-MOVBE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store i64 %bswap, ptr %dst, align 1
|
|
; X32-MOVBE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %bswap2 = shl i64 %bswap, 2
|
|
; X32-MOVBE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
|
;
|
|
; X32-FASTMOVBE-LABEL: 'var_bswap_store_i64_extrause'
|
|
; X32-FASTMOVBE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %bswap = call i64 @llvm.bswap.i64(i64 %a)
|
|
; X32-FASTMOVBE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store i64 %bswap, ptr %dst, align 1
|
|
; X32-FASTMOVBE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %bswap2 = shl i64 %bswap, 2
|
|
; X32-FASTMOVBE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
|
;
|
|
%bswap = call i64 @llvm.bswap.i64(i64 %a)
|
|
store i64 %bswap, ptr %dst, align 1
|
|
|
|
%bswap2 = shl i64 %bswap, 2 ; incur an extra use to the bswap
|
|
|
|
ret void
|
|
}
|
|
|
|
define void @var_bswap_store_i128(i128 %a, ptr %dst) {
|
|
; X64-LABEL: 'var_bswap_store_i128'
|
|
; X64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %bswap = call i128 @llvm.bswap.i128(i128 %a)
|
|
; X64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store i128 %bswap, ptr %dst, align 1
|
|
; X64-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
|
;
|
|
; X64-MOVBE-LABEL: 'var_bswap_store_i128'
|
|
; X64-MOVBE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %bswap = call i128 @llvm.bswap.i128(i128 %a)
|
|
; X64-MOVBE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store i128 %bswap, ptr %dst, align 1
|
|
; X64-MOVBE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
|
;
|
|
; X64-FASTMOVBE-LABEL: 'var_bswap_store_i128'
|
|
; X64-FASTMOVBE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %bswap = call i128 @llvm.bswap.i128(i128 %a)
|
|
; X64-FASTMOVBE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store i128 %bswap, ptr %dst, align 1
|
|
; X64-FASTMOVBE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
|
;
|
|
; X32-LABEL: 'var_bswap_store_i128'
|
|
; X32-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %bswap = call i128 @llvm.bswap.i128(i128 %a)
|
|
; X32-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store i128 %bswap, ptr %dst, align 1
|
|
; X32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
|
;
|
|
; X32-MOVBE-LABEL: 'var_bswap_store_i128'
|
|
; X32-MOVBE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %bswap = call i128 @llvm.bswap.i128(i128 %a)
|
|
; X32-MOVBE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store i128 %bswap, ptr %dst, align 1
|
|
; X32-MOVBE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
|
;
|
|
; X32-FASTMOVBE-LABEL: 'var_bswap_store_i128'
|
|
; X32-FASTMOVBE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %bswap = call i128 @llvm.bswap.i128(i128 %a)
|
|
; X32-FASTMOVBE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store i128 %bswap, ptr %dst, align 1
|
|
; X32-FASTMOVBE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
|
;
|
|
%bswap = call i128 @llvm.bswap.i128(i128 %a)
|
|
store i128 %bswap, ptr %dst, align 1
|
|
|
|
ret void
|
|
}
|
|
define void @var_bswap_store_i128_extrause(i128 %a, ptr %dst) {
|
|
; X64-LABEL: 'var_bswap_store_i128_extrause'
|
|
; X64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %bswap = call i128 @llvm.bswap.i128(i128 %a)
|
|
; X64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store i128 %bswap, ptr %dst, align 1
|
|
; X64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %bswap2 = shl i128 %bswap, 2
|
|
; X64-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
|
;
|
|
; X64-MOVBE-LABEL: 'var_bswap_store_i128_extrause'
|
|
; X64-MOVBE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %bswap = call i128 @llvm.bswap.i128(i128 %a)
|
|
; X64-MOVBE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store i128 %bswap, ptr %dst, align 1
|
|
; X64-MOVBE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %bswap2 = shl i128 %bswap, 2
|
|
; X64-MOVBE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
|
;
|
|
; X64-FASTMOVBE-LABEL: 'var_bswap_store_i128_extrause'
|
|
; X64-FASTMOVBE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %bswap = call i128 @llvm.bswap.i128(i128 %a)
|
|
; X64-FASTMOVBE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store i128 %bswap, ptr %dst, align 1
|
|
; X64-FASTMOVBE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %bswap2 = shl i128 %bswap, 2
|
|
; X64-FASTMOVBE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
|
;
|
|
; X32-LABEL: 'var_bswap_store_i128_extrause'
|
|
; X32-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %bswap = call i128 @llvm.bswap.i128(i128 %a)
|
|
; X32-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store i128 %bswap, ptr %dst, align 1
|
|
; X32-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %bswap2 = shl i128 %bswap, 2
|
|
; X32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
|
;
|
|
; X32-MOVBE-LABEL: 'var_bswap_store_i128_extrause'
|
|
; X32-MOVBE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %bswap = call i128 @llvm.bswap.i128(i128 %a)
|
|
; X32-MOVBE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store i128 %bswap, ptr %dst, align 1
|
|
; X32-MOVBE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %bswap2 = shl i128 %bswap, 2
|
|
; X32-MOVBE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
|
;
|
|
; X32-FASTMOVBE-LABEL: 'var_bswap_store_i128_extrause'
|
|
; X32-FASTMOVBE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %bswap = call i128 @llvm.bswap.i128(i128 %a)
|
|
; X32-FASTMOVBE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store i128 %bswap, ptr %dst, align 1
|
|
; X32-FASTMOVBE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %bswap2 = shl i128 %bswap, 2
|
|
; X32-FASTMOVBE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
|
;
|
|
%bswap = call i128 @llvm.bswap.i128(i128 %a)
|
|
store i128 %bswap, ptr %dst, align 1
|
|
|
|
%bswap2 = shl i128 %bswap, 2 ; incur an extra use to the bswap
|
|
|
|
ret void
|
|
}
|