[SystemZ] Make better use of VLLEZ
This patch fixes two deficiencies in current code that recognizes
the VLLEZ idiom:
- For the floating-point versions, we have ISel patterns that match
on a bitconvert as the top node. In more complex cases, that
bitconvert may already have been merged into something else.
Fix the patterns to match the inner nodes instead.
- For the 64-bit integer versions, depending on the surrounding code,
we may get either a DAG tree based on JOIN_DWORDS or one based on
INSERT_VECTOR_ELT. Use a PatFrags to simply match both variants.
llvm-svn: 349749
diff --git a/llvm/test/CodeGen/SystemZ/vec-move-18.ll b/llvm/test/CodeGen/SystemZ/vec-move-18.ll
index 5d3d09d..9bb6193 100644
--- a/llvm/test/CodeGen/SystemZ/vec-move-18.ll
+++ b/llvm/test/CodeGen/SystemZ/vec-move-18.ll
@@ -22,3 +22,15 @@
ret <4 x float> %ret
}
+; Test VLLEZLF with a float when the result is stored to memory.
+define void @f3(float *%ptr, <4 x float> *%res) {
+; CHECK-LABEL: f3:
+; CHECK: vllezlf [[REG:%v[0-9]+]], 0(%r2)
+; CHECK: vst [[REG]], 0(%r3)
+; CHECK: br %r14
+ %val = load float, float *%ptr
+ %ret = insertelement <4 x float> zeroinitializer, float %val, i32 0
+ store <4 x float> %ret, <4 x float> *%res
+ ret void
+}
+