xref: /llvm-project/llvm/test/CodeGen/PowerPC/vsx-fma-mutate-trivial-copy.ll (revision 5403c59c608c08c8ecd4303763f08eb046eb5e4d)
1; RUN: llc -verify-machineinstrs < %s | FileCheck %s
2target datalayout = "E-m:e-i64:64-n32:64"
3target triple = "powerpc64-unknown-linux-gnu"
4
5define void @LSH_recall_init(float %d_min, float %W) #0 {
6entry:
7  br i1 undef, label %for.body.lr.ph, label %for.end
8
9; CHECK-LABEL: @LSH_recall_init
10; CHECK: xsmaddadp
11
12for.body.lr.ph:                                   ; preds = %entry
13  %conv3 = fpext float %W to double
14  br label %for.body
15
16for.body:                                         ; preds = %for.body, %for.body.lr.ph
17  %div = fdiv reassoc arcp float 0.000000e+00, %W
18  %add = fadd reassoc float %div, %d_min
19  %conv2 = fpext float %add to double
20  %0 = tail call double @llvm.sqrt.f64(double %conv2)
21  %div4 = fdiv reassoc arcp double %conv3, %0
22  %call = tail call signext i32 @p_col_helper(double %div4) #2
23  br label %for.body
24
25for.end:                                          ; preds = %entry
26  ret void
27}
28
29; Function Attrs: nounwind readnone
30declare double @llvm.sqrt.f64(double) #1
31
32declare signext i32 @p_col_helper(...) #2
33
34attributes #0 = { nounwind "no-infs-fp-math"="true" "no-nans-fp-math"="true" "target-cpu"="pwr7" "unsafe-fp-math"="true" }
35attributes #1 = { nounwind readnone }
36attributes #2 = { nounwind }
37
38