mirror of
https://github.com/RPCS3/llvm.git
synced 2025-04-16 21:10:31 +00:00

Generate the slowest possible codepath for noopt CodeGen. Even trying to be clever with the negated jump can cause out-of-range jumps. Use a wide branch instead. Although the code is modelled simplistically, the later optimizations would recombine the branching into `cbz` if possible. This re-enables the previous optimization as well as hopefully gives us working code in all cases. Addresses PR30356! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285649 91177308-0d34-0410-b5e6-96231b3b80d8
16 lines
368 B
LLVM
16 lines
368 B
LLVM
; RUN: llc -O0 -mtriple thumbv7--windows-itanium -filetype obj -o - %s | llvm-objdump -disassemble - | FileCheck %s
|
|
|
|
declare i32 @llvm.arm.space(i32, i32)
|
|
|
|
define arm_aapcs_vfpcc i32 @f(i32 %n, i32 %d) local_unnamed_addr {
|
|
entry:
|
|
%div = sdiv i32 %n, %d
|
|
call i32 @llvm.arm.space(i32 128, i32 undef)
|
|
ret i32 %div
|
|
}
|
|
|
|
; CHECK: cmp r1, #0
|
|
; CHECK: beq #
|
|
; CHECK: bl
|
|
|