xref: /aosp_15_r20/external/llvm/test/CodeGen/SPARC/LeonReplaceFMULSPassUT.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc %s -O0 -march=sparc -mcpu=ut699 -o - | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: fmuls_fix_test
4*9880d681SAndroid Build Coastguard Worker; CHECK:       fstod %f20, %f2
5*9880d681SAndroid Build Coastguard Worker; CHECK:       fstod %f21, %f3
6*9880d681SAndroid Build Coastguard Worker; CHECK:       fmuld %f2, %f3, %f8
7*9880d681SAndroid Build Coastguard Worker; CHECK:       fstod %f20, %f0
8*9880d681SAndroid Build Coastguard Workerdefine double @fmuls_fix_test() {
9*9880d681SAndroid Build Coastguard Workerentry:
10*9880d681SAndroid Build Coastguard Worker  %a = alloca float, align 4
11*9880d681SAndroid Build Coastguard Worker  %b = alloca float, align 4
12*9880d681SAndroid Build Coastguard Worker  store float 0x402ECCCCC0000000, float* %a, align 4
13*9880d681SAndroid Build Coastguard Worker  store float 0x4022333340000000, float* %b, align 4
14*9880d681SAndroid Build Coastguard Worker  %0 = load float, float* %b, align 4
15*9880d681SAndroid Build Coastguard Worker  %1 = load float, float* %a, align 4
16*9880d681SAndroid Build Coastguard Worker  %mul = tail call double asm sideeffect "fmuls $0, $1, $2", "={f20},{f21},{f8}"(float* %a, float* %b)
17*9880d681SAndroid Build Coastguard Worker
18*9880d681SAndroid Build Coastguard Worker  ret double %mul
19*9880d681SAndroid Build Coastguard Worker}
20