1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc --mtriple=loongarch32 < %s | FileCheck %s --check-prefix=LA32
3 ; RUN: llc --mtriple=loongarch64 < %s | FileCheck %s --check-prefix=LA64
5 define i32 @icmpimm(i32 %x) {
8 ; LA32-NEXT: srli.w $a0, $a0, 12
9 ; LA32-NEXT: addi.w $a0, $a0, -1
10 ; LA32-NEXT: sltui $a0, $a0, 1
13 ; LA64-LABEL: icmpimm:
15 ; LA64-NEXT: bstrpick.d $a0, $a0, 31, 12
16 ; LA64-NEXT: addi.d $a0, $a0, -1
17 ; LA64-NEXT: sltui $a0, $a0, 1
19 %1 = and i32 %x, -4096
20 %2 = icmp eq i32 %1, 4096
21 %3 = zext i1 %2 to i32