xref: /aosp_15_r20/external/llvm/test/Transforms/BBVectorize/xcore/no-vector-registers.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1; RUN: opt < %s -bb-vectorize -bb-vectorize-req-chain-depth=3 -instcombine -gvn -S -mtriple=xcore | FileCheck %s
2
3target datalayout = "e-p:32:32:32-a0:0:32-n32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f16:16:32-f32:32:32-f64:32:32"
4target triple = "xcore"
5
6; Basic depth-3 chain
7define double @test1(double %A1, double %A2, double %B1, double %B2) {
8; CHECK-LABEL: @test1(
9; CHECK-NOT: <2 x double>
10  %X1 = fsub double %A1, %B1
11  %X2 = fsub double %A2, %B2
12  %Y1 = fmul double %X1, %A1
13  %Y2 = fmul double %X2, %A2
14  %Z1 = fadd double %Y1, %B1
15  %Z2 = fadd double %Y2, %B2
16  %R  = fmul double %Z1, %Z2
17  ret double %R
18}
19