xref: /llvm-project/llvm/test/CodeGen/ARM/SoftFloatVectorExtract.ll (revision bed1c7f061aa12417aa081e334afdba45767b938)
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc -mtriple=armv7a-linux-gnu < %s | FileCheck %s
3
4; Copied from llvm/test/CodeGen/Generic/2009-03-29-SoftFloatVectorExtract.ll,
5; making sure that soft float extract works on v7a soft float triples.
6
7@m = external global <2 x double>
8
9define double @vector_ex() nounwind #0 {
10; CHECK-LABEL: vector_ex:
11; CHECK:       @ %bb.0:
12; CHECK-NEXT:    movw r0, :lower16:m
13; CHECK-NEXT:    movt r0, :upper16:m
14; CHECK-NEXT:    vld1.64 {d16, d17}, [r0]
15; CHECK-NEXT:    vmov.32 r0, d17[0]
16; CHECK-NEXT:    vmov.32 r1, d17[1]
17; CHECK-NEXT:    bx lr
18       %v = load <2 x double>, ptr @m
19       %x = extractelement <2 x double> %v, i32 1
20       ret double %x
21}
22
23attributes #0 = { "use-soft-float" = "true" }
24