summaryrefslogtreecommitdiff
path: root/test/CodeGen/Hexagon
diff options
context:
space:
mode:
authorRon Lieberman <ronl@codeaurora.org>2017-10-02 00:16:15 +0000
committerRon Lieberman <ronl@codeaurora.org>2017-10-02 00:16:15 +0000
commit29fbd6fadb6d2747686e041597a8c0fd30057640 (patch)
tree33a992afbb195ed13629f8ea564800c641d4a5ae /test/CodeGen/Hexagon
parentecaac1300e9957c283fdf73f88517e62c9f85e68 (diff)
[Hexagon] Patch to Extract i1 element from vector of i1
This patch extracts 1 element from vector consisting of elements of size 1 bit at given index. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314641 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Hexagon')
-rw-r--r--test/CodeGen/Hexagon/vect/vect-extract-i1.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/CodeGen/Hexagon/vect/vect-extract-i1.ll b/test/CodeGen/Hexagon/vect/vect-extract-i1.ll
new file mode 100644
index 00000000000..8bcf1768b88
--- /dev/null
+++ b/test/CodeGen/Hexagon/vect/vect-extract-i1.ll
@@ -0,0 +1,9 @@
+; RUN: llc -march=hexagon < %s
+
+define i1 @t_i4x8(<4 x i8> %a, <4 x i8> %b) nounwind {
+entry:
+ %0 = add <4 x i8> %a, %b
+ %1 = bitcast <4 x i8> %0 to <32 x i1>
+ %2 = extractelement <32 x i1> %1, i32 0
+ ret i1 %2
+}