1 # RUN: llc -mtriple=thumbv7 -start-before=if-converter %s -o - | FileCheck %s
4 ; ModuleID = 'vdup-test.ll'
5 source_filename = "vdup-test.ll"
6 target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
7 target triple = "thumbv7"
9 define arm_aapcs_vfpcc <2 x i32> @NeonVdupMul(i32 %scalar, i32 %N, <2 x i32> %vector) {
11 %cmp = icmp ne i32 %N, 0
12 %broadcast = insertelement <2 x i32> undef, i32 %scalar, i32 0
13 %dup = shufflevector <2 x i32> %broadcast, <2 x i32> undef, <2 x i32> zeroinitializer
14 %mul = mul <2 x i32> %dup, %vector
15 br i1 %cmp, label %select.end, label %select.false
17 select.false: ; preds = %entry
20 select.end: ; preds = %entry, %select.false
21 %res = phi <2 x i32> [ %mul, %entry ], [ %vector, %select.false ]
29 exposesReturnsTwice: false
31 regBankSelected: false
34 tracksRegLiveness: true
38 - { reg: '$r0', virtual-reg: '' }
39 - { reg: '$r1', virtual-reg: '' }
40 - { reg: '$d0', virtual-reg: '' }
42 isFrameAddressTaken: false
43 isReturnAddressTaken: false
53 cvBytesOfCalleeSavedRegisters: 0
54 hasOpaqueSPAdjustment: false
56 hasMustTailInVarArgFunc: false
64 machineFunctionInfo: {}
67 successors: %bb.1(0x50000000), %bb.2(0x30000000)
68 liveins: $d0, $r0, $r1
70 t2CMPri killed renamable $r1, 0, 14, $noreg, implicit-def $cpsr
71 t2Bcc %bb.2, 0, killed $cpsr
74 successors: %bb.2(0x80000000)
77 renamable $d16 = VDUP32d killed renamable $r0, 14, $noreg
78 ; Verify that the neon instructions haven't been conditionalized:
79 ; CHECK-LABEL: NeonVdupMul
82 renamable $d0 = VMULv2i32 killed renamable $d16, killed renamable $d0, 14, $noreg
87 tBX_RET 14, $noreg, implicit $d0