brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.3 KiB · c03e985 Raw
124 lines · plain
1# RUN: llc -mtriple arm-- -run-pass=legalizer %s -o - | FileCheck %s2# RUN: llc -mtriple thumb-- -mattr=+v6t2 -run-pass=legalizer %s -o - | FileCheck %s3--- |4  define void @test_icmp_s8() { ret void }5  define void @test_icmp_s16() { ret void }6  define void @test_icmp_s32() { ret void }7 8  define void @test_icmp_p0() { ret void }9...10---11name:            test_icmp_s812# CHECK-LABEL: name: test_icmp_s813legalized:       false14# CHECK: legalized: true15regBankSelected: false16selected:        false17tracksRegLiveness: true18registers:19  - { id: 0, class: _ }20  - { id: 1, class: _ }21  - { id: 2, class: _ }22  - { id: 3, class: _ }23  - { id: 4, class: _ }24  - { id: 5, class: _ }25body:             |26  bb.0:27    liveins: $r0, $r128 29    %0(p0) = COPY $r030    %1(s8) = G_LOAD %0 :: (load (s8))31    %2(p0) = COPY $r132    %3(s8) = G_LOAD %2 :: (load (s8))33    %4(s1) = G_ICMP intpred(ne), %1(s8), %334    ; G_ICMP with s8 should widen35    ; CHECK: {{%[0-9]+}}:_(s1) = G_ICMP intpred(ne), {{%[0-9]+}}(s32), {{%[0-9]+}}36    ; CHECK-NOT: {{%[0-9]+}}:_(s1) = G_ICMP intpred(ne), {{%[0-9]+}}(s8), {{%[0-9]+}}37    %5(s32) = G_ZEXT %4(s1)38    $r0 = COPY %5(s32)39    BX_RET 14, $noreg, implicit $r040...41---42name:            test_icmp_s1643# CHECK-LABEL: name: test_icmp_s1644legalized:       false45# CHECK: legalized: true46regBankSelected: false47selected:        false48tracksRegLiveness: true49registers:50  - { id: 0, class: _ }51  - { id: 1, class: _ }52  - { id: 2, class: _ }53  - { id: 3, class: _ }54  - { id: 4, class: _ }55  - { id: 5, class: _ }56body:             |57  bb.0:58    liveins: $r0, $r159 60    %0(p0) = COPY $r061    %1(s16) = G_LOAD %0 :: (load (s16))62    %2(p0) = COPY $r163    %3(s16) = G_LOAD %2 :: (load (s16))64    %4(s1) = G_ICMP intpred(slt), %1(s16), %365    ; G_ICMP with s16 should widen66    ; CHECK: {{%[0-9]+}}:_(s1) = G_ICMP intpred(slt), {{%[0-9]+}}(s32), {{%[0-9]+}}67    ; CHECK-NOT: {{%[0-9]+}}:_(s1) = G_ICMP intpred(slt), {{%[0-9]+}}(s16), {{%[0-9]+}}68    %5(s32) = G_ZEXT %4(s1)69    $r0 = COPY %5(s32)70    BX_RET 14, $noreg, implicit $r071...72---73name:            test_icmp_s3274# CHECK-LABEL: name: test_icmp_s3275legalized:       false76# CHECK: legalized: true77regBankSelected: false78selected:        false79tracksRegLiveness: true80registers:81  - { id: 0, class: _ }82  - { id: 1, class: _ }83  - { id: 2, class: _ }84  - { id: 3, class: _ }85body:             |86  bb.0:87    liveins: $r0, $r188 89    %0(s32) = COPY $r090    %1(s32) = COPY $r191    %2(s1) = G_ICMP intpred(eq), %0(s32), %192    ; G_ICMP with s32 is legal, so we should find it unchanged in the output93    ; CHECK: {{%[0-9]+}}:_(s1) = G_ICMP intpred(eq), {{%[0-9]+}}(s32), {{%[0-9]+}}94    %3(s32) = G_ZEXT %2(s1)95    $r0 = COPY %3(s32)96    BX_RET 14, $noreg, implicit $r097...98---99name:            test_icmp_p0100# CHECK-LABEL: name: test_icmp_p0101legalized:       false102# CHECK: legalized: true103regBankSelected: false104selected:        false105tracksRegLiveness: true106registers:107  - { id: 0, class: _ }108  - { id: 1, class: _ }109  - { id: 2, class: _ }110  - { id: 3, class: _ }111body:             |112  bb.0:113    liveins: $r0, $r1114 115    %0(p0) = COPY $r0116    %1(p0) = COPY $r1117    %2(s1) = G_ICMP intpred(eq), %0(p0), %1118    ; G_ICMP with p0 is legal, so we should find it unchanged in the output119    ; CHECK: {{%[0-9]+}}:_(s1) = G_ICMP intpred(eq), {{%[0-9]+}}(p0), {{%[0-9]+}}120    %3(s32) = G_ZEXT %2(s1)121    $r0 = COPY %3(s32)122    BX_RET 14, $noreg, implicit $r0123...124