1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc --mtriple=loongarch32 --mattr=+d < %s | FileCheck %s --check-prefix=LA32
3 ; RUN: llc --mtriple=loongarch64 --mattr=+d < %s | FileCheck %s --check-prefix=LA64
5 ;; Test the bare double-precision floating-point values selection:
6 ;; https://llvm.org/docs/LangRef.html#select-instruction
8 define double @test(i1 %a, double %b, double %c) {
11 ; LA32-NEXT: andi $a0, $a0, 1
12 ; LA32-NEXT: movgr2cf $fcc0, $a0
13 ; LA32-NEXT: fsel $fa0, $fa1, $fa0, $fcc0
18 ; LA64-NEXT: andi $a0, $a0, 1
19 ; LA64-NEXT: movgr2cf $fcc0, $a0
20 ; LA64-NEXT: fsel $fa0, $fa1, $fa0, $fcc0
22 %res = select i1 %a, double %b, double %c