blob: f3013fc64b1bcc0cf5fb30aeb955c1b53a8c8f91 [file] [log] [blame]
# RUN: llc -mtriple arm-- -run-pass=legalizer %s -o - | FileCheck %s
# RUN: llc -mtriple thumb-- -mattr=+v6t2 -run-pass=legalizer %s -o - | FileCheck %s
--- |
define void @test_brcond() { ret void }
...
---
name: test_brcond
# CHECK-LABEL: name: test_brcond
legalized: false
# CHECK: legalized: true
regBankSelected: false
selected: false
tracksRegLiveness: true
registers:
- { id: 0, class: _ }
- { id: 1, class: _ }
- { id: 2, class: _ }
body: |
bb.0:
successors: %bb.1(0x40000000), %bb.2(0x40000000)
liveins: $r0, $r1
%0(s32) = COPY $r0
%1(s32) = COPY $r1
%2(s1) = G_ICMP intpred(sgt), %0(s32), %1
G_BRCOND %2(s1), %bb.1
; G_BRCOND with s1 is legal, so we should find it unchanged in the output
; CHECK: G_BRCOND {{%[0-9]+}}(s1), %bb.1
G_BR %bb.2
bb.1:
$r0 = COPY %1(s32)
BX_RET 14, $noreg, implicit $r0
bb.2:
$r0 = COPY %0(s32)
BX_RET 14, $noreg, implicit $r0
...