1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 3
2 ; RUN: llc --mtriple=loongarch32 -verify-machineinstrs < %s \
3 ; RUN: | FileCheck %s --check-prefix=LA32
4 ; RUN: llc --mtriple=loongarch64 -verify-machineinstrs < %s \
5 ; RUN: | FileCheck %s --check-prefix=LA64
7 define zeroext i8 @test_zext_i8(ptr %p) nounwind {
8 ; LA32-LABEL: test_zext_i8:
10 ; LA32-NEXT: ld.bu $a0, $a0, 0
13 ; LA64-LABEL: test_zext_i8:
15 ; LA64-NEXT: ld.bu $a0, $a0, 0
17 %a = load i8, ptr %p, align 1
23 define zeroext i16 @test_zext_i16(ptr %p) nounwind {
24 ; LA32-LABEL: test_zext_i16:
26 ; LA32-NEXT: ld.bu $a1, $a0, 0
27 ; LA32-NEXT: ld.bu $a0, $a0, 1
28 ; LA32-NEXT: slli.w $a0, $a0, 8
29 ; LA32-NEXT: or $a0, $a0, $a1
32 ; LA64-LABEL: test_zext_i16:
34 ; LA64-NEXT: ld.hu $a0, $a0, 0
36 %a = load i16, ptr %p, align 1