llvm-project/llvm/test/CodeGen/ARM/shouldRewriteCopySrc.ll
Matt Arsenault 93509064a6 Revert "ARM: Remove override of shouldRewriteCopySrc (#125219)"
This reverts commit 9d90f8ba7113fd9c7b2662682ad94b744ed2b78c.

Test fails the machine verifier. There's a bug somewhere, the
unrepresentable cases should be avoided by the default logic.
2025-05-05 22:08:48 +02:00

29 lines
1008 B
LLVM

; 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 }