mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-08 13:00:43 +00:00
a523293cd9
We can only generate immediates up to #510 with a MOV+ADD, not #511, because there's no such instruction as add #256. Found by Oliver Stannard and csmith! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272665 91177308-0d34-0410-b5e6-96231b3b80d8
20 lines
588 B
LLVM
20 lines
588 B
LLVM
; RUN: llc < %s -mtriple=thumbv7-linux-gnueabi -mcpu=cortex-m0 -verify-machineinstrs | FileCheck --check-prefix CHECK-T1 %s
|
|
; RUN: llc < %s -mtriple=thumbv7-linux-gnueabi -mcpu=cortex-m3 -verify-machineinstrs | FileCheck --check-prefix CHECK-T2 %s
|
|
|
|
; CHECK-T1-LABEL: @mov_and_add
|
|
; CHECK-T2-LABEL: @mov_and_add
|
|
; CHECK-T1: movs r0, #255
|
|
; CHECK-T1: adds r0, #12
|
|
; CHECK-T2: movw r0, #267
|
|
define i32 @mov_and_add() {
|
|
ret i32 267
|
|
}
|
|
|
|
; CHECK-T1-LABEL: @mov_and_add2
|
|
; CHECK-T2-LABEL: @mov_and_add2
|
|
; CHECK-T1: ldr r0,
|
|
; CHECK-T2: movw r0, #511
|
|
define i32 @mov_and_add2() {
|
|
ret i32 511
|
|
}
|