mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Enable generating legacy IT block for AArch32
By default, the behavior of IT block generation will be determinated dynamically base on the arch (armv8 vs armv7). This patch adds backend options: -arm-restrict-it and -arm-no-restrict-it. The former one restricts the generation of IT blocks (the same behavior as thumbv8) for both arches. The later one allows the generation of legacy IT block (the same behavior as ARMv7 Thumb2) for both arches. Clang will support -mrestrict-it and -mno-restrict-it, which is compatible with GCC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194592 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
; RUN: llc < %s -mtriple=thumbv7-apple-darwin | FileCheck %s
|
||||
|
||||
; RUN: llc < %s -mtriple=thumbv7-apple-darwin -arm-default-it | FileCheck %s
|
||||
; RUN: llc < %s -mtriple=thumbv8 -arm-no-restrict-it |FileCheck %s
|
||||
define i32 @t1(i32 %a, i32 %b, i32 %c, i32 %d) nounwind {
|
||||
; CHECK-LABEL: t1:
|
||||
; CHECK: ittt ne
|
||||
@@ -74,7 +75,7 @@ entry:
|
||||
; CHECK-LABEL: t3:
|
||||
; CHECK: itt ge
|
||||
; CHECK: movge r0, r1
|
||||
; CHECK: blge _foo
|
||||
; CHECK: blge {{_?}}foo
|
||||
%tmp1 = icmp sgt i32 %a, 10 ; <i1> [#uses=1]
|
||||
br i1 %tmp1, label %cond_true, label %UnifiedReturnBlock
|
||||
|
||||
|
@@ -1,4 +1,6 @@
|
||||
; RUN: llc < %s -mtriple=thumbv7-apple-ios | FileCheck %s
|
||||
; RUN: llc < %s -mtriple=thumbv7-apple-ios -arm-default-it | FileCheck %s
|
||||
; RUN: llc < %s -mtriple=thumbv8-apple-ios -arm-no-restrict-it | FileCheck %s
|
||||
|
||||
define void @foo(i32 %X, i32 %Y) {
|
||||
entry:
|
||||
|
@@ -1,4 +1,6 @@
|
||||
; RUN: llc < %s -mtriple=thumbv7-apple-darwin | FileCheck %s
|
||||
; RUN: llc < %s -mtriple=thumbv7-apple-darwin -arm-default-it | FileCheck %s
|
||||
; RUN: llc < %s -mtriple=thumbv8-apple-darwin -arm-no-restrict-it | FileCheck %s
|
||||
|
||||
; There shouldn't be a unconditional branch at end of bb52.
|
||||
; rdar://7184787
|
||||
|
@@ -1,4 +1,5 @@
|
||||
; RUN: llc < %s -mtriple=thumbv8 -mattr=+neon | FileCheck %s
|
||||
; RUN: llc < %s -mtriple=thumbv7 -mattr=+neon -arm-restrict-it | FileCheck %s
|
||||
|
||||
;CHECK-LABEL: select_s_v_v:
|
||||
;CHECK-NOT: it
|
||||
|
@@ -1,4 +1,5 @@
|
||||
; RUN: llc < %s -mtriple=thumbv8 | FileCheck %s
|
||||
; RUN: llc < %s -mtriple=thumbv7 -arm-restrict-it | FileCheck %s
|
||||
|
||||
%struct.quad_struct = type { i32, i32, %struct.quad_struct*, %struct.quad_struct*, %struct.quad_struct*, %struct.quad_struct*, %struct.quad_struct* }
|
||||
|
||||
|
@@ -1,5 +1,7 @@
|
||||
; RUN: llc < %s -mtriple=thumbv8 | FileCheck %s
|
||||
; RUN: llc < %s -mtriple=thumbv7 -arm-restrict-it | FileCheck %s
|
||||
; RUN: llc < %s -mtriple=thumbv8 -relocation-model=pic | FileCheck %s --check-prefix=CHECK-PIC
|
||||
; RUN: llc < %s -mtriple=thumbv7 -arm-restrict-it -relocation-model=pic | FileCheck %s --check-prefix=CHECK-PIC
|
||||
|
||||
%struct.FF = type { i32 (i32*)*, i32 (i32*, i32*, i32, i32, i32, i32)*, i32 (i32, i32, i8*)*, void ()*, i32 (i32, i8*, i32*)*, i32 ()* }
|
||||
%struct.BD = type { %struct.BD*, i32, i32, i32, i32, i64, i32 (%struct.BD*, i8*, i64, i32)*, i32 (%struct.BD*, i8*, i32, i32)*, i32 (%struct.BD*, i8*, i64, i32)*, i32 (%struct.BD*, i8*, i32, i32)*, i32 (%struct.BD*, i64, i32)*, [16 x i8], i64, i64 }
|
||||
|
@@ -1,5 +1,7 @@
|
||||
; RUN: llc < %s -mtriple=thumbv8-eabi -float-abi=hard | FileCheck %s
|
||||
; RUN: llc < %s -mtriple=thumbv7-eabi -float-abi=hard -arm-restrict-it | FileCheck %s
|
||||
; RUN: llc < %s -mtriple=thumbv8-eabi -float-abi=hard -regalloc=basic | FileCheck %s
|
||||
; RUN: llc < %s -mtriple=thumbv7-eabi -float-abi=hard -regalloc=basic -arm-restrict-it | FileCheck %s
|
||||
|
||||
%"struct.__gnu_cxx::__normal_iterator<char*,std::basic_string<char, std::char_traits<char>, std::allocator<char> > >" = type { i8* }
|
||||
%"struct.__gnu_cxx::new_allocator<char>" = type <{ i8 }>
|
||||
|
@@ -1,4 +1,5 @@
|
||||
; RUN: llc < %s -mtriple=thumbv8 | FileCheck %s
|
||||
; RUN: llc < %s -mtriple=thumbv7 -arm-restrict-it | FileCheck %s
|
||||
; CHECK: it ne
|
||||
; CHECK-NEXT: cmpne
|
||||
; CHECK-NEXT: beq
|
||||
|
Reference in New Issue
Block a user