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 3 4--- | 5 target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" 6 target triple = "aarch64--" 7 define void @test_zeroext(i8* %addr) { 8 entry: 9 ret void 10 } 11 define void @test_no_anyext(i8* %addr) { 12 entry: 13 ret void 14 } 15... 16 17--- 18name: test_zeroext 19legalized: true 20body: | 21 bb.0.entry: 22 liveins: $x0 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 1 from %ir.addr) 26 ; CHECK: $w0 = COPY [[ZEXTLOAD]](s32) 27 %0:_(p0) = COPY $x0 28 %1:_(s8) = G_LOAD %0 :: (load 1 from %ir.addr) 29 %2:_(s32) = G_ZEXT %1 30 $w0 = COPY %2 31... 32 33--- 34name: test_no_anyext 35legalized: true 36body: | 37 bb.0.entry: 38 liveins: $x0 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 4 from %ir.addr) 44 ; CHECK: [[ANYEXT:%[0-9]+]]:_(s64) = G_ANYEXT [[LOAD]](s32) 45 ; CHECK: $x0 = COPY [[ANYEXT]](s64) 46 %0:_(p0) = COPY $x0 47 %1:_(s32) = G_LOAD %0 :: (load 4 from %ir.addr) 48 %2:_(s64) = G_ANYEXT %1 49 $x0 = COPY %2 50... 51