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
53 lines
2.1 KiB
LLVM
53 lines
2.1 KiB
LLVM
; RUN: llc -mtriple=x86_64-unknown-unknown -mattr=+sse4.1 -O0 < %s | FileCheck %s
|
|
|
|
; Check that at -O0, the backend doesn't attempt to canonicalize a vector load
|
|
; used by an INSERTPS into a scalar load plus scalar_to_vector.
|
|
;
|
|
; In order to fold a load into the memory operand of an INSERTPSrm, the backend
|
|
; tries to canonicalize a vector load in input to an INSERTPS node into a
|
|
; scalar load plus scalar_to_vector. This would allow ISel to match the
|
|
; INSERTPSrm variant rather than a load plus INSERTPSrr.
|
|
;
|
|
; However, ISel can only select an INSERTPSrm if folding a load into the operand
|
|
; of an insertps is considered to be profitable.
|
|
;
|
|
; In the example below:
|
|
;
|
|
; __m128 test(__m128 a, __m128 *b) {
|
|
; __m128 c = _mm_insert_ps(a, *b, 1 << 6);
|
|
; return c;
|
|
; }
|
|
;
|
|
; At -O0, the backend would attempt to canonicalize the load to 'b' into
|
|
; a scalar load in the hope of matching an INSERTPSrm.
|
|
; However, ISel would fail to recognize an INSERTPSrm since load folding is
|
|
; always considered unprofitable at -O0. This would leave the insertps mask
|
|
; in an invalid state.
|
|
;
|
|
; The problem with the canonicalization rule performed by the backend is that
|
|
; it assumes ISel to always be able to match an INSERTPSrm. This assumption is
|
|
; not always correct at -O0. In this example, FastISel fails to lower the
|
|
; arguments needed by the entry block. This is enough to enable the DAGCombiner
|
|
; and eventually trigger the canonicalization on the INSERTPS node.
|
|
;
|
|
; This test checks that the vector load in input to the insertps is not
|
|
; canonicalized into a scalar load plus scalar_to_vector (a movss).
|
|
|
|
define <4 x float> @test(<4 x float> %a, ptr %b) {
|
|
; CHECK-LABEL: test:
|
|
; CHECK: movaps (%rdi), [[REG:%[a-z0-9]+]]
|
|
; CHECK-NOT: movss
|
|
; CHECK: insertps $64, [[REG]],
|
|
; CHECK: ret
|
|
entry:
|
|
%0 = load <4 x float>, ptr %b, align 16
|
|
%1 = call <4 x float> @llvm.x86.sse41.insertps(<4 x float> %a, <4 x float> %0, i32 64)
|
|
%2 = alloca <4 x float>, align 16
|
|
store <4 x float> %1, ptr %2, align 16
|
|
%3 = load <4 x float>, ptr %2, align 16
|
|
ret <4 x float> %3
|
|
}
|
|
|
|
|
|
declare <4 x float> @llvm.x86.sse41.insertps(<4 x float>, <4 x float>, i32)
|