diff --git a/test/CodeGen/R600/array-ptr-calc-i64.ll b/test/CodeGen/R600/array-ptr-calc-i64.ll index e254c5f6463..296247147ff 100644 --- a/test/CodeGen/R600/array-ptr-calc-i64.ll +++ b/test/CodeGen/R600/array-ptr-calc-i64.ll @@ -1,13 +1,13 @@ -; XFAIL: * -; RUN: llc < %s -march=r600 -mcpu=SI -verify-machineinstrs| FileCheck --check-prefix=SI %s +; RUN: llc -march=r600 -mcpu=SI -verify-machineinstrs < %s | FileCheck -check-prefix=SI %s declare i32 @llvm.SI.tid() readnone - -; SI-LABEL: @test_array_ptr_calc( -define void @test_array_ptr_calc(i32 addrspace(1)* noalias %out, [16 x i32] addrspace(1)* noalias %inA, i32 addrspace(1)* noalias %inB) { +; SI-LABEL: @test_array_ptr_calc +; SI: V_MUL_LO_I32 +; SI: V_MUL_HI_I32 +define void @test_array_ptr_calc(i32 addrspace(1)* noalias %out, [1025 x i32] addrspace(1)* noalias %inA, i32 addrspace(1)* noalias %inB) { %tid = call i32 @llvm.SI.tid() readnone - %a_ptr = getelementptr [16 x i32] addrspace(1)* %inA, i32 1, i32 %tid + %a_ptr = getelementptr [1025 x i32] addrspace(1)* %inA, i32 %tid, i32 0 %b_ptr = getelementptr i32 addrspace(1)* %inB, i32 %tid %a = load i32 addrspace(1)* %a_ptr %b = load i32 addrspace(1)* %b_ptr @@ -15,4 +15,3 @@ define void @test_array_ptr_calc(i32 addrspace(1)* noalias %out, [16 x i32] addr store i32 %result, i32 addrspace(1)* %out ret void } - diff --git a/test/CodeGen/R600/insert_vector_elt.ll b/test/CodeGen/R600/insert_vector_elt.ll index 593ad1077b0..18769eddb3f 100644 --- a/test/CodeGen/R600/insert_vector_elt.ll +++ b/test/CodeGen/R600/insert_vector_elt.ll @@ -199,3 +199,53 @@ endif: store <2 x i32> %7, <2 x i32> addrspace(1)* %out ret void } + +; SI-LABEL: @dynamic_insertelement_v2f64: +; SI: BUFFER_STORE_DWORDX2 +; SI: BUFFER_STORE_DWORDX2 +; SI: BUFFER_STORE_DWORDX2 +; SI: BUFFER_STORE_DWORDX2 +; SI: S_ENDPGM +define void @dynamic_insertelement_v2f64(<2 x double> addrspace(1)* %out, <2 x double> %a, i32 %b) nounwind { + %vecins = insertelement <2 x double> %a, double 8.0, i32 %b + store <2 x double> %vecins, <2 x double> addrspace(1)* %out, align 16 + ret void +} + +; SI-LABEL: @dynamic_insertelement_v2i64: +; SI: BUFFER_STORE_DWORDX2 +; SI: BUFFER_STORE_DWORDX2 +; SI: S_ENDPGM +define void @dynamic_insertelement_v2i64(<2 x i64> addrspace(1)* %out, <2 x i64> %a, i32 %b) nounwind { + %vecins = insertelement <2 x i64> %a, i64 5, i32 %b + store <2 x i64> %vecins, <2 x i64> addrspace(1)* %out, align 8 + ret void +} + +; SI-LABEL: @dynamic_insertelement_v4f64: +; SI: BUFFER_STORE_DWORDX2 +; SI: BUFFER_STORE_DWORDX2 +; SI: BUFFER_STORE_DWORDX2 +; SI: BUFFER_STORE_DWORDX2 +; SI: S_ENDPGM +define void @dynamic_insertelement_v4f64(<4 x double> addrspace(1)* %out, <4 x double> %a, i32 %b) nounwind { + %vecins = insertelement <4 x double> %a, double 8.0, i32 %b + store <4 x double> %vecins, <4 x double> addrspace(1)* %out, align 16 + ret void +} + +; SI-LABEL: @dynamic_insertelement_v8f64: +; SI: BUFFER_STORE_DWORDX2 +; SI: BUFFER_STORE_DWORDX2 +; SI: BUFFER_STORE_DWORDX2 +; SI: BUFFER_STORE_DWORDX2 +; SI: BUFFER_STORE_DWORDX2 +; SI: BUFFER_STORE_DWORDX2 +; SI: BUFFER_STORE_DWORDX2 +; SI: BUFFER_STORE_DWORDX2 +; SI: S_ENDPGM +define void @dynamic_insertelement_v8f64(<8 x double> addrspace(1)* %out, <8 x double> %a, i32 %b) nounwind { + %vecins = insertelement <8 x double> %a, double 8.0, i32 %b + store <8 x double> %vecins, <8 x double> addrspace(1)* %out, align 16 + ret void +} diff --git a/test/CodeGen/R600/insert_vector_elt_f64.ll b/test/CodeGen/R600/insert_vector_elt_f64.ll deleted file mode 100644 index 595bc59655a..00000000000 --- a/test/CodeGen/R600/insert_vector_elt_f64.ll +++ /dev/null @@ -1,36 +0,0 @@ -; REQUIRES: asserts -; XFAIL: * -; RUN: llc -march=r600 -mcpu=SI -verify-machineinstrs< %s | FileCheck -check-prefix=SI %s - - -; SI-LABEL: @dynamic_insertelement_v2f64: -; SI: BUFFER_STORE_DWORDX4 -define void @dynamic_insertelement_v2f64(<2 x double> addrspace(1)* %out, <2 x double> %a, i32 %b) nounwind { - %vecins = insertelement <2 x double> %a, double 8.0, i32 %b - store <2 x double> %vecins, <2 x double> addrspace(1)* %out, align 16 - ret void -} - -; SI-LABEL: @dynamic_insertelement_v2f64: -; SI: BUFFER_STORE_DWORDX4 -define void @dynamic_insertelement_v2i64(<2 x i64> addrspace(1)* %out, <2 x i64> %a, i32 %b) nounwind { - %vecins = insertelement <2 x i64> %a, i64 5, i32 %b - store <2 x i64> %vecins, <2 x i64> addrspace(1)* %out, align 8 - ret void -} - -; SI-LABEL: @dynamic_insertelement_v4f64: -; SI: BUFFER_STORE_DWORDX4 -define void @dynamic_insertelement_v4f64(<4 x double> addrspace(1)* %out, <4 x double> %a, i32 %b) nounwind { - %vecins = insertelement <4 x double> %a, double 8.0, i32 %b - store <4 x double> %vecins, <4 x double> addrspace(1)* %out, align 16 - ret void -} - -; SI-LABEL: @dynamic_insertelement_v8f64: -; SI: BUFFER_STORE_DWORDX4 -define void @dynamic_insertelement_v8f64(<8 x double> addrspace(1)* %out, <8 x double> %a, i32 %b) nounwind { - %vecins = insertelement <8 x double> %a, double 8.0, i32 %b - store <8 x double> %vecins, <8 x double> addrspace(1)* %out, align 16 - ret void -}