25 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc --mtriple=loongarch32 --mattr=+d < %s | FileCheck %s --check-prefix=LA323; RUN: llc --mtriple=loongarch64 --mattr=+d < %s | FileCheck %s --check-prefix=LA644 5;; Test the bare double-precision floating-point values selection:6;; https://llvm.org/docs/LangRef.html#select-instruction7 8define double @test(i1 %a, double %b, double %c) {9; LA32-LABEL: test:10; LA32: # %bb.0:11; LA32-NEXT: andi $a0, $a0, 112; LA32-NEXT: movgr2cf $fcc0, $a013; LA32-NEXT: fsel $fa0, $fa1, $fa0, $fcc014; LA32-NEXT: ret15;16; LA64-LABEL: test:17; LA64: # %bb.0:18; LA64-NEXT: andi $a0, $a0, 119; LA64-NEXT: movgr2cf $fcc0, $a020; LA64-NEXT: fsel $fa0, $fa1, $fa0, $fcc021; LA64-NEXT: ret22 %res = select i1 %a, double %b, double %c23 ret double %res24}25