1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc --mtriple=loongarch32 -mattr=+d --mcpu=generic < %s \
3 ; RUN: | FileCheck %s --check-prefix=LA32
4 ; RUN: llc --mtriple=loongarch32 -mattr=+d --mcpu=generic-la32 < %s \
5 ; RUN: | FileCheck %s --check-prefix=LA32
6 ; RUN: llc --mtriple=loongarch64 -mattr=+d --mcpu=generic < %s \
7 ; RUN: | FileCheck %s --check-prefix=LA64
8 ; RUN: llc --mtriple=loongarch64 -mattr=+d --mcpu=generic-la64 < %s \
9 ; RUN: | FileCheck %s --check-prefix=LA64
11 ;; The CPU name "generic" should map to the corresponding concrete names
12 ;; according to the target triple's bitness.
13 define i64 @f(i64 signext %a, i64 signext %b) {
16 ; LA32-NEXT: add.w $a1, $a1, $a3
17 ; LA32-NEXT: add.w $a2, $a0, $a2
18 ; LA32-NEXT: sltu $a0, $a2, $a0
19 ; LA32-NEXT: add.w $a1, $a1, $a0
20 ; LA32-NEXT: move $a0, $a2
25 ; LA64-NEXT: add.d $a0, $a0, $a1
27 %1 = add nsw i64 %a, %b