xref: /aosp_15_r20/external/llvm/test/CodeGen/PowerPC/qpx-bv-sint.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Workertarget datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f128:128:128-v128:128:128-n32:64"
2*9880d681SAndroid Build Coastguard Workertarget triple = "powerpc64-bgq-linux"
3*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=ppc64 -mcpu=a2q | FileCheck %s
4*9880d681SAndroid Build Coastguard Worker
5*9880d681SAndroid Build Coastguard Workerdefine void @s452(i32 %inp1) nounwind {
6*9880d681SAndroid Build Coastguard Workerentry:
7*9880d681SAndroid Build Coastguard Worker  br label %for.body4
8*9880d681SAndroid Build Coastguard Worker
9*9880d681SAndroid Build Coastguard Workerfor.body4:                                        ; preds = %for.body4, %entry
10*9880d681SAndroid Build Coastguard Worker  %conv.4 = sitofp i32 %inp1 to double
11*9880d681SAndroid Build Coastguard Worker  %conv.5 = sitofp i32 %inp1 to double
12*9880d681SAndroid Build Coastguard Worker  %mul.4.v.i0.1 = insertelement <2 x double> undef, double %conv.4, i32 0
13*9880d681SAndroid Build Coastguard Worker  %mul.4.v.i0.2 = insertelement <2 x double> %mul.4.v.i0.1, double %conv.5, i32 1
14*9880d681SAndroid Build Coastguard Worker  %mul.4 = fmul <2 x double> %mul.4.v.i0.2, undef
15*9880d681SAndroid Build Coastguard Worker  %add7.4 = fadd <2 x double> undef, %mul.4
16*9880d681SAndroid Build Coastguard Worker  store <2 x double> %add7.4, <2 x double>* undef, align 16
17*9880d681SAndroid Build Coastguard Worker  br i1 undef, label %for.end, label %for.body4
18*9880d681SAndroid Build Coastguard Worker
19*9880d681SAndroid Build Coastguard Workerfor.end:                                          ; preds = %for.body4
20*9880d681SAndroid Build Coastguard Worker  unreachable
21*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: @s452
22*9880d681SAndroid Build Coastguard Worker; CHECK: lfiwax [[REG1:[0-9]+]],
23*9880d681SAndroid Build Coastguard Worker; CHECK: fcfid [[REG2:[0-9]+]], [[REG1]]
24*9880d681SAndroid Build Coastguard Worker; FIXME: We could 'promote' this to a vector earlier and remove this splat.
25*9880d681SAndroid Build Coastguard Worker; CHECK: qvesplati {{[0-9]+}}, [[REG2]], 0
26*9880d681SAndroid Build Coastguard Worker; CHECK: qvfmul
27*9880d681SAndroid Build Coastguard Worker; CHECK: qvfadd
28*9880d681SAndroid Build Coastguard Worker; CHECK: qvesplati {{[0-9]+}},
29*9880d681SAndroid Build Coastguard Worker; FIXME: We can use qvstfcdx here instead of two stores.
30*9880d681SAndroid Build Coastguard Worker; CHECK: stfd
31*9880d681SAndroid Build Coastguard Worker; CHECK: stfd
32*9880d681SAndroid Build Coastguard Worker}
33*9880d681SAndroid Build Coastguard Worker
34