69 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=sparc | FileCheck %s --check-prefixes=SPARC324; RUN: sed 's/ITy/i64/g' %s | llc -mtriple=sparc | FileCheck %s --check-prefixes=SPARC325; RUN: sed 's/ITy/i32/g' %s | llc -mtriple=sparc64 | FileCheck %s --check-prefixes=SPARC646; RUN: sed 's/ITy/i64/g' %s | llc -mtriple=sparc64 | FileCheck %s --check-prefixes=SPARC647 8; FIXME: crash "Input type needs to be promoted!"9; define ITy @test_lrint_ixx_f16(half %x) nounwind {10; %res = tail call ITy @llvm.lrint.ITy.f16(half %x)11; ret ITy %res12; }13 14; define ITy @test_llrint_ixx_f16(half %x) nounwind {15; %res = tail call ITy @llvm.llrint.ITy.f16(half %x)16; ret ITy %res17; }18 19define ITy @test_lrint_ixx_f32(float %x) nounwind {20; SPARC32-LABEL: test_lrint_ixx_f32:21; SPARC32: call lrintf22;23; SPARC64-LABEL: test_lrint_ixx_f32:24; SPARC64: call lrintf25 %res = tail call ITy @llvm.lrint.ITy.f32(float %x)26 ret ITy %res27}28 29define ITy @test_llrint_ixx_f32(float %x) nounwind {30; SPARC32-LABEL: test_llrint_ixx_f32:31; SPARC32: call llrintf32;33; SPARC64-LABEL: test_llrint_ixx_f32:34; SPARC64: call llrintf35 %res = tail call ITy @llvm.llrint.ITy.f32(float %x)36 ret ITy %res37}38 39define ITy @test_lrint_ixx_f64(double %x) nounwind {40; SPARC32-LABEL: test_lrint_ixx_f64:41; SPARC32: call lrint42;43; SPARC64-LABEL: test_lrint_ixx_f64:44; SPARC64: call lrint45 %res = tail call ITy @llvm.lrint.ITy.f64(double %x)46 ret ITy %res47}48 49define ITy @test_llrint_ixx_f64(double %x) nounwind {50; SPARC32-LABEL: test_llrint_ixx_f64:51; SPARC32: call llrint52;53; SPARC64-LABEL: test_llrint_ixx_f64:54; SPARC64: call llrint55 %res = tail call ITy @llvm.llrint.ITy.f64(double %x)56 ret ITy %res57}58 59; FIXME(#41838): unsupported type60; define ITy @test_lrint_ixx_f128(fp128 %x) nounwind {61; %res = tail call ITy @llvm.lrint.ITy.f128(fp128 %x)62; ret ITy %res63; }64 65; define ITy @test_llrint_ixx_f128(fp128 %x) nounwind {66; %res = tail call ITy @llvm.llrint.ITy.f128(fp128 %x)67; ret ITy %res68; }69