llvm.org GIT mirror llvm / 3d7f79a
Set ISD::FROUND to Expand by default for all types For most libm ISD nodes, TargetLoweringBase::initActions sets the default scalar-type action to Expand, and leaves the vector-type action default as Legal. This is not appropriate for the new ISD::FROUND node (which no backend but PowerPC handles explicitly). Fixes PR16842. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188048 91177308-0d34-0410-b5e6-96231b3b80d8 Hal Finkel 6 years ago
2 changed file(s) with 25 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
686686 // These operations default to expand.
687687 setOperationAction(ISD::FGETSIGN, (MVT::SimpleValueType)VT, Expand);
688688 setOperationAction(ISD::CONCAT_VECTORS, (MVT::SimpleValueType)VT, Expand);
689
690 // These library functions default to expand.
691 setOperationAction(ISD::FROUND, (MVT::SimpleValueType)VT, Expand);
689692 }
690693
691694 // Most targets ignore the @llvm.prefetch intrinsic.
710713 setOperationAction(ISD::FNEARBYINT, MVT::f16, Expand);
711714 setOperationAction(ISD::FCEIL, MVT::f16, Expand);
712715 setOperationAction(ISD::FRINT, MVT::f16, Expand);
713 setOperationAction(ISD::FROUND, MVT::f16, Expand);
714716 setOperationAction(ISD::FTRUNC, MVT::f16, Expand);
715717 setOperationAction(ISD::FLOG , MVT::f32, Expand);
716718 setOperationAction(ISD::FLOG2, MVT::f32, Expand);
721723 setOperationAction(ISD::FNEARBYINT, MVT::f32, Expand);
722724 setOperationAction(ISD::FCEIL, MVT::f32, Expand);
723725 setOperationAction(ISD::FRINT, MVT::f32, Expand);
724 setOperationAction(ISD::FROUND, MVT::f32, Expand);
725726 setOperationAction(ISD::FTRUNC, MVT::f32, Expand);
726727 setOperationAction(ISD::FLOG , MVT::f64, Expand);
727728 setOperationAction(ISD::FLOG2, MVT::f64, Expand);
732733 setOperationAction(ISD::FNEARBYINT, MVT::f64, Expand);
733734 setOperationAction(ISD::FCEIL, MVT::f64, Expand);
734735 setOperationAction(ISD::FRINT, MVT::f64, Expand);
735 setOperationAction(ISD::FROUND, MVT::f64, Expand);
736736 setOperationAction(ISD::FTRUNC, MVT::f64, Expand);
737737 setOperationAction(ISD::FLOG , MVT::f128, Expand);
738738 setOperationAction(ISD::FLOG2, MVT::f128, Expand);
743743 setOperationAction(ISD::FNEARBYINT, MVT::f128, Expand);
744744 setOperationAction(ISD::FCEIL, MVT::f128, Expand);
745745 setOperationAction(ISD::FRINT, MVT::f128, Expand);
746 setOperationAction(ISD::FROUND, MVT::f128, Expand);
747746 setOperationAction(ISD::FTRUNC, MVT::f128, Expand);
748747
749748 // Default ISD::TRAP to expand (which turns it into abort).
0 ; RUN: llc -mcpu=nehalem -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s
1 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
2 target triple = "x86_64-unknown-linux-gnu"
3
4 declare void @use(<2 x double>)
5
6 ; CHECK-LABEL: @test
7 ; CHECK callq round
8
9 ; Function Attrs: nounwind uwtable
10 define void @test() {
11 entry:
12 %tmp = call <2 x double> @llvm.round.v2f64(<2 x double> undef)
13 call void @use(<2 x double> %tmp)
14 ret void
15 }
16
17 ; Function Attrs: nounwind readonly
18 declare <2 x double> @llvm.round.v2f64(<2 x double>) #0
19
20 attributes #0 = { nounwind readonly }
21