brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.2 KiB · d3af215 Raw
77 lines · plain
1; Tests for lrint and llrint, with both i32 and i64 checked.2 3; RUN: sed 's/ITy/i32/g' %s | llc -mtriple=riscv32 | FileCheck %s --check-prefixes=RV324; RUN: sed 's/ITy/i64/g' %s | llc -mtriple=riscv32 | FileCheck %s --check-prefixes=RV325; RUN: sed 's/ITy/i32/g' %s | llc -mtriple=riscv64 | FileCheck %s --check-prefixes=RV646; RUN: sed 's/ITy/i64/g' %s | llc -mtriple=riscv64 | FileCheck %s --check-prefixes=RV647 8; FIXME: crash9; define ITy @test_lrint_ixx_f16(half %x) nounwind {10;   %res = tail call ITy @llvm.lrint.ITy.f16(half %x)11; }12 13; define ITy @test_llrint_ixx_f16(half %x) nounwind {14;   %res = tail call ITy @llvm.llrint.ITy.f16(half %x)15; }16 17define ITy @test_lrint_ixx_f32(float %x) nounwind {18; RV32-LABEL: test_lrint_ixx_f32:19; RV32:         call lrintf20;21; RV64-LABEL: test_lrint_ixx_f32:22; RV64:         call lrintf23  %res = tail call ITy @llvm.lrint.ITy.f32(float %x)24  ret ITy %res25}26 27define ITy @test_llrint_ixx_f32(float %x) nounwind {28; RV32-LABEL: test_llrint_ixx_f32:29; RV32:         call llrintf30;31; RV64-LABEL: test_llrint_ixx_f32:32; RV64:         call llrintf33  %res = tail call ITy @llvm.llrint.ITy.f32(float %x)34  ret ITy %res35}36 37define ITy @test_lrint_ixx_f64(double %x) nounwind {38; RV32-LABEL: test_lrint_ixx_f64:39; RV32:         call lrint40;41; RV64-LABEL: test_lrint_ixx_f64:42; RV64:         call lrint43  %res = tail call ITy @llvm.lrint.ITy.f64(double %x)44  ret ITy %res45}46 47define ITy @test_llrint_ixx_f64(double %x) nounwind {48; RV32-LABEL: test_llrint_ixx_f64:49; RV32:         call llrint50;51; RV64-LABEL: test_llrint_ixx_f64:52; RV64:         call llrint53  %res = tail call ITy @llvm.llrint.ITy.f64(double %x)54  ret ITy %res55}56 57; FIXME(#44744): incorrect libcall on riscv3258define ITy @test_lrint_ixx_f128(fp128 %x) nounwind {59; RV32-LABEL: test_lrint_ixx_f128:60; RV32:         call lrintl61;62; RV64-LABEL: test_lrint_ixx_f128:63; RV64:         call lrintl64  %res = tail call ITy @llvm.lrint.ITy.f128(fp128 %x)65  ret ITy %res66}67 68define ITy @test_llrint_ixx_f128(fp128 %x) nounwind {69; RV32-LABEL: test_llrint_ixx_f128:70; RV32:         call llrintl71;72; RV64-LABEL: test_llrint_ixx_f128:73; RV64:         call llrintl74  %res = tail call ITy @llvm.llrint.ITy.f128(fp128 %x)75  ret ITy %res76}77