1 ; RUN: llc -mtriple=m68k -global-isel -stop-after=regbankselect < %s | FileCheck %s
3 define i32 @test_add(i32 %x, i32 %y) {
4 ; CHECK-LABEL: name: test_add
5 ; CHECK: bb.1 (%ir-block.0):
6 ; CHECK: [[G_F_I1:%[0-9]+]]:anygpr(p0) = G_FRAME_INDEX
7 ; CHECK: [[G_LOAD1:%[0-9]+]]:anygpr(s32) = G_LOAD [[G_F_I1]](p0)
8 ; CHECK: [[G_F_I2:%[0-9]+]]:anygpr(p0) = G_FRAME_INDEX
9 ; CHECK: [[G_LOAD2:%[0-9]+]]:anygpr(s32) = G_LOAD [[G_F_I2]](p0)
10 ; CHECK: [[G_ADD1:%[0-9]+]]:anygpr(s32) = G_ADD [[G_LOAD1]], [[G_LOAD2]]
11 ; CHECK: $d0 = COPY [[G_ADD1]](s32)
12 ; CHECK: RTS implicit $d0
17 define i32 @test_sub(i32 %x, i32 %y) {
18 ; CHECK-LABEL: name: test_sub
19 ; CHECK: bb.1 (%ir-block.0):
20 ; CHECK: [[G_F_I1:%[0-9]+]]:anygpr(p0) = G_FRAME_INDEX
21 ; CHECK: [[G_LOAD1:%[0-9]+]]:anygpr(s32) = G_LOAD [[G_F_I1]](p0)
22 ; CHECK: [[G_F_I2:%[0-9]+]]:anygpr(p0) = G_FRAME_INDEX
23 ; CHECK: [[G_LOAD2:%[0-9]+]]:anygpr(s32) = G_LOAD [[G_F_I2]](p0)
24 ; CHECK: [[G_SUB1:%[0-9]+]]:anygpr(s32) = G_SUB [[G_LOAD1]], [[G_LOAD2]]
25 ; CHECK: $d0 = COPY [[G_SUB1]](s32)
26 ; CHECK: RTS implicit $d0
27 %diff = sub i32 %x, %y