1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -run-pass=aarch64-postlegalizer-combiner -global-isel -verify-machineinstrs %s -o - | FileCheck %s
5 target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
6 target triple = "aarch64--"
7 define void @test_zeroext(i8* %addr) {
11 define void @test_no_anyext(i8* %addr) {
23 ; CHECK-LABEL: name: test_zeroext
24 ; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
25 ; CHECK: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p0) :: (load (s8) from %ir.addr)
26 ; CHECK: $w0 = COPY [[ZEXTLOAD]](s32)
28 %1:_(s8) = G_LOAD %0 :: (load (s8) from %ir.addr)
39 ; Check that we don't try to do an anyext combine. We don't want to do this
40 ; because an anyexting load like s64 = G_LOAD %p (load 4) isn't legal.
41 ; CHECK-LABEL: name: test_no_anyext
42 ; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
43 ; CHECK: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p0) :: (load (s32) from %ir.addr)
44 ; CHECK: [[ANYEXT:%[0-9]+]]:_(s64) = G_ANYEXT [[LOAD]](s32)
45 ; CHECK: $x0 = COPY [[ANYEXT]](s64)
47 %1:_(s32) = G_LOAD %0 :: (load (s32) from %ir.addr)
48 %2:_(s64) = G_ANYEXT %1