aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/CodeGen/ARM/shouldRewriteCopySrc.ll
blob: e653aaa316fedc92e15500eaae738771d015b669 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
; RUN: llc -mtriple=arm-none-eabihf -mcpu=cortex-a55 < %s | FileCheck %s

; Test that the override of shouldRewriteCopySrc does something

define float @shouldRewriteCopySrc(double %arg) #0 {
; CHECK-LABEL: shouldRewriteCopySrc:
; CHECK:       @ %bb.0: @ %bb
; CHECK-NEXT:    .vsave {d8, d9, d10, d11, d12, d13, d14, d15}
; CHECK-NEXT:    vpush {d8, d9, d10, d11, d12, d13, d14, d15}
; CHECK-NEXT:    vadd.f64 d16, d0, d0
; CHECK-NEXT:    @APP
; CHECK-NEXT:    nop
; CHECK-NEXT:    @NO_APP
; CHECK-NEXT:    vmov r0, r1, d16
; CHECK-NEXT:    vmov s0, r0
; CHECK-NEXT:    vpop {d8, d9, d10, d11, d12, d13, d14, d15}
; CHECK-NEXT:    bx lr
bb:
  %i = fadd double %arg, %arg
  tail call void asm sideeffect "nop", "~{q0},~{q1},~{q2},~{q3},~{q4},~{q5},~{q6},~{q7}"() #0
  %i1 = bitcast double %i to i64
  %i2 = trunc i64 %i1 to i32
  %i3 = bitcast i32 %i2 to float
  ret float %i3
}

attributes #0 = { nounwind }