1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple aarch64 -O0 -run-pass=aarch64-prelegalizer-combiner -global-isel -verify-machineinstrs %s -o - | FileCheck %s
4 # Check we don't try to combine a load of < s8 as that will end up creating a illegal non-extending load.
6 define i8 @test(i1* %ptr) {
14 tracksRegLiveness: true
24 ; CHECK-LABEL: name: test
26 ; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
27 ; CHECK: [[LOAD:%[0-9]+]]:_(s1) = G_LOAD [[COPY]](p0) :: (load (s1) from %ir.ptr)
28 ; CHECK: [[ZEXT:%[0-9]+]]:_(s32) = G_ZEXT [[LOAD]](s1)
29 ; CHECK: $w0 = COPY [[ZEXT]](s32)
30 ; CHECK: RET_ReallyLR implicit $w0
32 %1:_(s1) = G_LOAD %0(p0) :: (load (s1) from %ir.ptr)
33 %2:_(s8) = G_ZEXT %1(s1)
34 %3:_(s32) = G_ANYEXT %2(s8)
36 RET_ReallyLR implicit $w0