diff options
author | Daniel Sanders <daniel.sanders@imgtec.com> | 2013-09-27 12:31:32 +0000 |
---|---|---|
committer | Daniel Sanders <daniel.sanders@imgtec.com> | 2013-09-27 12:31:32 +0000 |
commit | 37469a132988eb0c888f6a8a205b2aca510e14f8 (patch) | |
tree | 608d28967974c20986f73527f469f29b054e8fde /test/CodeGen/Mips/msa | |
parent | b4691b495d867a863aa12de57d45bc6a93e4df78 (diff) | |
download | external_llvm-37469a132988eb0c888f6a8a205b2aca510e14f8.zip external_llvm-37469a132988eb0c888f6a8a205b2aca510e14f8.tar.gz external_llvm-37469a132988eb0c888f6a8a205b2aca510e14f8.tar.bz2 |
[mips][msa] Implemented insert_vector_elt for v4f32 and v2f64.
For v4f32 and v2f64, INSERT_VECTOR_ELT is matched by a pseudo-insn which is
later expanded to appropriate insve.[wd] insns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191515 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Mips/msa')
-rw-r--r-- | test/CodeGen/Mips/msa/basic_operations_float.ll | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test/CodeGen/Mips/msa/basic_operations_float.ll b/test/CodeGen/Mips/msa/basic_operations_float.ll index 0b29385..d045920 100644 --- a/test/CodeGen/Mips/msa/basic_operations_float.ll +++ b/test/CodeGen/Mips/msa/basic_operations_float.ll @@ -135,3 +135,37 @@ define double @extract_v2f64_elt0() nounwind { ret double %3 ; MIPS32: .size extract_v2f64_elt0 } + +define void @insert_v4f32(float %a) nounwind { + ; MIPS32: insert_v4f32: + + %1 = load <4 x float>* @v4f32 + ; MIPS32-DAG: ld.w [[R1:\$w[0-9]+]], + + %2 = insertelement <4 x float> %1, float %a, i32 1 + ; float argument passed in $f12 + ; MIPS32-DAG: insve.w [[R1]][1], $w12[0] + + store <4 x float> %2, <4 x float>* @v4f32 + ; MIPS32-DAG: st.w [[R1]] + + ret void + ; MIPS32: .size insert_v4f32 +} + +define void @insert_v2f64(double %a) nounwind { + ; MIPS32: insert_v2f64: + + %1 = load <2 x double>* @v2f64 + ; MIPS32-DAG: ld.d [[R1:\$w[0-9]+]], + + %2 = insertelement <2 x double> %1, double %a, i32 1 + ; double argument passed in $f12 + ; MIPS32-DAG: insve.d [[R1]][1], $w12[0] + + store <2 x double> %2, <2 x double>* @v2f64 + ; MIPS32-DAG: st.d [[R1]] + + ret void + ; MIPS32: .size insert_v2f64 +} |