xref: /aosp_15_r20/external/llvm/test/CodeGen/Thumb2/2009-10-15-ITBlockBranch.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple=thumbv7-eabi -mcpu=cortex-a8 -float-abi=hard | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple=thumbv7-eabi -mcpu=cortex-a8 -float-abi=hard -regalloc=basic | FileCheck %s
3*9880d681SAndroid Build Coastguard Worker; PR5204
4*9880d681SAndroid Build Coastguard Worker
5*9880d681SAndroid Build Coastguard Worker%"struct.__gnu_cxx::__normal_iterator<char*,std::basic_string<char, std::char_traits<char>, std::allocator<char> > >" = type { i8* }
6*9880d681SAndroid Build Coastguard Worker%"struct.__gnu_cxx::new_allocator<char>" = type <{ i8 }>
7*9880d681SAndroid Build Coastguard Worker%"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >" = type { %"struct.__gnu_cxx::__normal_iterator<char*,std::basic_string<char, std::char_traits<char>, std::allocator<char> > >" }
8*9880d681SAndroid Build Coastguard Worker%"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Rep" = type { %"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Rep_base" }
9*9880d681SAndroid Build Coastguard Worker%"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Rep_base" = type { i32, i32, i32 }
10*9880d681SAndroid Build Coastguard Worker
11*9880d681SAndroid Build Coastguard Worker
12*9880d681SAndroid Build Coastguard Workerdefine weak arm_aapcs_vfpcc i32 @_ZNKSs7compareERKSs(%"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >"* %this, %"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >"* %__str) {
13*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: _ZNKSs7compareERKSs:
14*9880d681SAndroid Build Coastguard Worker; CHECK:      it  eq
15*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: subeq{{(.w)?}} r0, r{{[0-9]+}}, r{{[0-9]+}}
16*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: pop.w
17*9880d681SAndroid Build Coastguard Workerentry:
18*9880d681SAndroid Build Coastguard Worker  %0 = tail call arm_aapcs_vfpcc  i32 @_ZNKSs4sizeEv(%"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >"* %this) ; <i32> [#uses=3]
19*9880d681SAndroid Build Coastguard Worker  %1 = tail call arm_aapcs_vfpcc  i32 @_ZNKSs4sizeEv(%"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >"* %__str) ; <i32> [#uses=3]
20*9880d681SAndroid Build Coastguard Worker  %2 = icmp ult i32 %1, %0                        ; <i1> [#uses=1]
21*9880d681SAndroid Build Coastguard Worker  %3 = select i1 %2, i32 %1, i32 %0               ; <i32> [#uses=1]
22*9880d681SAndroid Build Coastguard Worker  %4 = tail call arm_aapcs_vfpcc  i8* @_ZNKSs7_M_dataEv(%"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >"* %this) ; <i8*> [#uses=1]
23*9880d681SAndroid Build Coastguard Worker  %5 = tail call arm_aapcs_vfpcc  i8* @_ZNKSs4dataEv(%"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >"* %__str) ; <i8*> [#uses=1]
24*9880d681SAndroid Build Coastguard Worker  %6 = tail call arm_aapcs_vfpcc  i32 @memcmp(i8* %4, i8* %5, i32 %3) nounwind readonly ; <i32> [#uses=2]
25*9880d681SAndroid Build Coastguard Worker  %7 = icmp eq i32 %6, 0                          ; <i1> [#uses=1]
26*9880d681SAndroid Build Coastguard Worker  br i1 %7, label %bb, label %bb1
27*9880d681SAndroid Build Coastguard Worker
28*9880d681SAndroid Build Coastguard Workerbb:                                               ; preds = %entry
29*9880d681SAndroid Build Coastguard Worker  %8 = sub i32 %0, %1                             ; <i32> [#uses=1]
30*9880d681SAndroid Build Coastguard Worker  ret i32 %8
31*9880d681SAndroid Build Coastguard Worker
32*9880d681SAndroid Build Coastguard Workerbb1:                                              ; preds = %entry
33*9880d681SAndroid Build Coastguard Worker  ret i32 %6
34*9880d681SAndroid Build Coastguard Worker}
35*9880d681SAndroid Build Coastguard Worker
36*9880d681SAndroid Build Coastguard Workerdeclare arm_aapcs_vfpcc i32 @memcmp(i8* nocapture, i8* nocapture, i32) nounwind readonly
37*9880d681SAndroid Build Coastguard Worker
38*9880d681SAndroid Build Coastguard Workerdeclare arm_aapcs_vfpcc i32 @_ZNKSs4sizeEv(%"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >"* %this)
39*9880d681SAndroid Build Coastguard Worker
40*9880d681SAndroid Build Coastguard Workerdeclare arm_aapcs_vfpcc i8* @_ZNKSs7_M_dataEv(%"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >"* %this)
41*9880d681SAndroid Build Coastguard Worker
42*9880d681SAndroid Build Coastguard Workerdeclare arm_aapcs_vfpcc i8* @_ZNKSs4dataEv(%"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >"* %this)
43