forked from OSchip/llvm-project
71 lines
2.2 KiB
YAML
71 lines
2.2 KiB
YAML
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
|
|
# RUN: llc -O0 -mtriple=mipsel-linux-gnu -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=MIPS32
|
|
--- |
|
|
|
|
define void @select_i32() {entry: ret void}
|
|
define void @select_ptr() {entry: ret void}
|
|
|
|
...
|
|
---
|
|
name: select_i32
|
|
alignment: 2
|
|
legalized: true
|
|
regBankSelected: true
|
|
tracksRegLiveness: true
|
|
body: |
|
|
bb.1.entry:
|
|
liveins: $a0, $a1, $a2
|
|
|
|
; MIPS32-LABEL: name: select_i32
|
|
; MIPS32: liveins: $a0, $a1, $a2
|
|
; MIPS32: [[COPY:%[0-9]+]]:gpr32 = COPY $a0
|
|
; MIPS32: [[COPY1:%[0-9]+]]:gpr32 = COPY $a1
|
|
; MIPS32: [[COPY2:%[0-9]+]]:gpr32 = COPY $a2
|
|
; MIPS32: [[ORi:%[0-9]+]]:gpr32 = ORi $zero, 1
|
|
; MIPS32: [[AND:%[0-9]+]]:gpr32 = AND [[COPY]], [[ORi]]
|
|
; MIPS32: [[MOVN_I_I:%[0-9]+]]:gpr32 = MOVN_I_I [[COPY1]], [[AND]], [[COPY2]]
|
|
; MIPS32: $v0 = COPY [[MOVN_I_I]]
|
|
; MIPS32: RetRA implicit $v0
|
|
%3:gprb(s32) = COPY $a0
|
|
%1:gprb(s32) = COPY $a1
|
|
%2:gprb(s32) = COPY $a2
|
|
%6:gprb(s32) = G_CONSTANT i32 1
|
|
%7:gprb(s32) = COPY %3(s32)
|
|
%5:gprb(s32) = G_AND %7, %6
|
|
%4:gprb(s32) = G_SELECT %5(s32), %1, %2
|
|
$v0 = COPY %4(s32)
|
|
RetRA implicit $v0
|
|
|
|
...
|
|
---
|
|
name: select_ptr
|
|
alignment: 2
|
|
legalized: true
|
|
regBankSelected: true
|
|
tracksRegLiveness: true
|
|
body: |
|
|
bb.1.entry:
|
|
liveins: $a0, $a1, $a2
|
|
|
|
; MIPS32-LABEL: name: select_ptr
|
|
; MIPS32: liveins: $a0, $a1, $a2
|
|
; MIPS32: [[COPY:%[0-9]+]]:gpr32 = COPY $a0
|
|
; MIPS32: [[COPY1:%[0-9]+]]:gpr32 = COPY $a1
|
|
; MIPS32: [[COPY2:%[0-9]+]]:gpr32 = COPY $a2
|
|
; MIPS32: [[ORi:%[0-9]+]]:gpr32 = ORi $zero, 1
|
|
; MIPS32: [[AND:%[0-9]+]]:gpr32 = AND [[COPY]], [[ORi]]
|
|
; MIPS32: [[MOVN_I_I:%[0-9]+]]:gpr32 = MOVN_I_I [[COPY1]], [[AND]], [[COPY2]]
|
|
; MIPS32: $v0 = COPY [[MOVN_I_I]]
|
|
; MIPS32: RetRA implicit $v0
|
|
%3:gprb(s32) = COPY $a0
|
|
%1:gprb(p0) = COPY $a1
|
|
%2:gprb(p0) = COPY $a2
|
|
%6:gprb(s32) = G_CONSTANT i32 1
|
|
%7:gprb(s32) = COPY %3(s32)
|
|
%5:gprb(s32) = G_AND %7, %6
|
|
%4:gprb(p0) = G_SELECT %5(s32), %1, %2
|
|
$v0 = COPY %4(p0)
|
|
RetRA implicit $v0
|
|
|
|
...
|