llvm.org GIT mirror llvm / 204c769
[FunctionAttrs] Annotate "willreturn" for intrinsics Summary: In D62801, new function attribute `willreturn` was introduced. In short, a function with `willreturn` is guaranteed to come back to the call site(more precise definition is in LangRef). In this patch, willreturn is annotated for LLVM intrinsics. Reviewers: jdoerfert Reviewed By: jdoerfert Subscribers: jvesely, nhaehnle, sstefan1, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64904 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367184 91177308-0d34-0410-b5e6-96231b3b80d8 Hideto Ueno a month ago
27 changed file(s) with 209 addition(s) and 217 deletion(s). Raw diff Collapse all Expand all
451451 // memory while not impeding optimization.
452452 def int_prefetch
453453 : Intrinsic<[], [ llvm_anyptr_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty ],
454 [ IntrInaccessibleMemOrArgMemOnly, ReadOnly<0>, NoCapture<0>,
454 [ IntrInaccessibleMemOrArgMemOnly, IntrWillReturn, ReadOnly<0>, NoCapture<0>,
455455 ImmArg<1>, ImmArg<2>]>;
456456 def int_pcmarker : Intrinsic<[], [llvm_i32_ty]>;
457457
459459
460460 // The assume intrinsic is marked as arbitrarily writing so that proper
461461 // control dependencies will be maintained.
462 def int_assume : Intrinsic<[], [llvm_i1_ty], []>;
462 def int_assume : Intrinsic<[], [llvm_i1_ty], [IntrWillReturn]>;
463463
464464 // Stack Protector Intrinsic - The stackprotector intrinsic writes the stack
465465 // guard to the correct place on the stack frame.
492492 def int_memcpy : Intrinsic<[],
493493 [llvm_anyptr_ty, llvm_anyptr_ty, llvm_anyint_ty,
494494 llvm_i1_ty],
495 [IntrArgMemOnly, NoCapture<0>, NoCapture<1>,
495 [IntrArgMemOnly, IntrWillReturn, NoCapture<0>, NoCapture<1>,
496496 WriteOnly<0>, ReadOnly<1>, ImmArg<3>]>;
497497 def int_memmove : Intrinsic<[],
498498 [llvm_anyptr_ty, llvm_anyptr_ty, llvm_anyint_ty,
499499 llvm_i1_ty],
500 [IntrArgMemOnly, NoCapture<0>, NoCapture<1>,
500 [IntrArgMemOnly, IntrWillReturn, NoCapture<0>, NoCapture<1>,
501501 ReadOnly<1>, ImmArg<3>]>;
502502 def int_memset : Intrinsic<[],
503503 [llvm_anyptr_ty, llvm_i8_ty, llvm_anyint_ty,
504504 llvm_i1_ty],
505 [IntrArgMemOnly, NoCapture<0>, WriteOnly<0>,
505 [IntrArgMemOnly, IntrWillReturn, NoCapture<0>, WriteOnly<0>,
506506 ImmArg<3>]>;
507507
508508 // FIXME: Add version of these floating point intrinsics which allow non-default
509509 // rounding modes and FP exception handling.
510510
511 let IntrProperties = [IntrNoMem, IntrSpeculatable] in {
511 let IntrProperties = [IntrNoMem, IntrSpeculatable, IntrWillReturn] in {
512512 def int_fma : Intrinsic<[llvm_anyfloat_ty],
513513 [LLVMMatchType<0>, LLVMMatchType<0>,
514514 LLVMMatchType<0>]>;
550550
551551 def int_minnum : Intrinsic<[llvm_anyfloat_ty],
552552 [LLVMMatchType<0>, LLVMMatchType<0>],
553 [IntrNoMem, IntrSpeculatable, Commutative]
553 [IntrNoMem, IntrSpeculatable, IntrWillReturn, Commutative]
554554 >;
555555 def int_maxnum : Intrinsic<[llvm_anyfloat_ty],
556556 [LLVMMatchType<0>, LLVMMatchType<0>],
557 [IntrNoMem, IntrSpeculatable, Commutative]
557 [IntrNoMem, IntrSpeculatable, IntrWillReturn, Commutative]
558558 >;
559559 def int_minimum : Intrinsic<[llvm_anyfloat_ty],
560560 [LLVMMatchType<0>, LLVMMatchType<0>],
561 [IntrNoMem, IntrSpeculatable, Commutative]
561 [IntrNoMem, IntrSpeculatable, IntrWillReturn, Commutative]
562562 >;
563563 def int_maximum : Intrinsic<[llvm_anyfloat_ty],
564564 [LLVMMatchType<0>, LLVMMatchType<0>],
565 [IntrNoMem, IntrSpeculatable, Commutative]
565 [IntrNoMem, IntrSpeculatable, IntrWillReturn, Commutative]
566566 >;
567567
568568 // NOTE: these are internal interfaces.
581581 //===--------------- Constrained Floating Point Intrinsics ----------------===//
582582 //
583583
584 let IntrProperties = [IntrInaccessibleMemOnly] in {
584 let IntrProperties = [IntrInaccessibleMemOnly, IntrWillReturn] in {
585585 def int_experimental_constrained_fadd : Intrinsic<[ llvm_anyfloat_ty ],
586586 [ LLVMMatchType<0>,
587587 LLVMMatchType<0>,
710710 //===------------------------- Expect Intrinsics --------------------------===//
711711 //
712712 def int_expect : Intrinsic<[llvm_anyint_ty],
713 [LLVMMatchType<0>, LLVMMatchType<0>], [IntrNoMem]>;
713 [LLVMMatchType<0>, LLVMMatchType<0>], [IntrNoMem, IntrWillReturn]>;
714714
715715 //===-------------------- Bit Manipulation Intrinsics ---------------------===//
716716 //
717717
718718 // None of these intrinsics accesses memory at all.
719 let IntrProperties = [IntrNoMem, IntrSpeculatable] in {
719 let IntrProperties = [IntrNoMem, IntrSpeculatable, IntrWillReturn] in {
720720 def int_bswap: Intrinsic<[llvm_anyint_ty], [LLVMMatchType<0>]>;
721721 def int_ctpop: Intrinsic<[llvm_anyint_ty], [LLVMMatchType<0>]>;
722722 def int_bitreverse : Intrinsic<[llvm_anyint_ty], [LLVMMatchType<0>]>;
726726 [LLVMMatchType<0>, LLVMMatchType<0>, LLVMMatchType<0>]>;
727727 }
728728
729 let IntrProperties = [IntrNoMem, IntrSpeculatable, ImmArg<1>] in {
729 let IntrProperties = [IntrNoMem, IntrSpeculatable, IntrWillReturn, ImmArg<1>] in {
730730 def int_ctlz : Intrinsic<[llvm_anyint_ty], [LLVMMatchType<0>, llvm_i1_ty]>;
731731 def int_cttz : Intrinsic<[llvm_anyint_ty], [LLVMMatchType<0>, llvm_i1_ty]>;
732732 }
738738 // mean the optimizers can change them aggressively. Special handling
739739 // needed in a few places. These synthetic intrinsics have no
740740 // side-effects and just mark information about their operands.
741 let IntrProperties = [IntrNoMem, IntrSpeculatable] in {
741 let IntrProperties = [IntrNoMem, IntrSpeculatable, IntrWillReturn] in {
742742 def int_dbg_declare : Intrinsic<[],
743743 [llvm_metadata_ty,
744744 llvm_metadata_ty,
795795 def int_var_annotation : Intrinsic<[],
796796 [llvm_ptr_ty, llvm_ptr_ty,
797797 llvm_ptr_ty, llvm_i32_ty],
798 [], "llvm.var.annotation">;
798 [IntrWillReturn], "llvm.var.annotation">;
799799 def int_ptr_annotation : Intrinsic<[LLVMAnyPointerType],
800800 [LLVMMatchType<0>, llvm_ptr_ty, llvm_ptr_ty,
801801 llvm_i32_ty],
802 [], "llvm.ptr.annotation">;
802 [IntrWillReturn], "llvm.ptr.annotation">;
803803 def int_annotation : Intrinsic<[llvm_anyint_ty],
804804 [LLVMMatchType<0>, llvm_ptr_ty,
805805 llvm_ptr_ty, llvm_i32_ty],
806 [], "llvm.annotation">;
806 [IntrWillReturn], "llvm.annotation">;
807807
808808 // Annotates the current program point with metadata strings which are emitted
809809 // as CodeView debug info records. This is expensive, as it disables inlining
810810 // and is modelled as having side effects.
811811 def int_codeview_annotation : Intrinsic<[], [llvm_metadata_ty],
812 [IntrInaccessibleMemOnly, IntrNoDuplicate],
812 [IntrInaccessibleMemOnly, IntrNoDuplicate, IntrWillReturn],
813813 "llvm.codeview.annotation">;
814814
815815 //===------------------------ Trampoline Intrinsics -----------------------===//
827827 //
828828
829829 // Expose the carry flag from add operations on two integrals.
830 def int_sadd_with_overflow : Intrinsic<[llvm_anyint_ty,
831 LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>],
832 [LLVMMatchType<0>, LLVMMatchType<0>],
833 [IntrNoMem, IntrSpeculatable]>;
834 def int_uadd_with_overflow : Intrinsic<[llvm_anyint_ty,
835 LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>],
836 [LLVMMatchType<0>, LLVMMatchType<0>],
837 [IntrNoMem, IntrSpeculatable]>;
838
839 def int_ssub_with_overflow : Intrinsic<[llvm_anyint_ty,
840 LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>],
841 [LLVMMatchType<0>, LLVMMatchType<0>],
842 [IntrNoMem, IntrSpeculatable]>;
843 def int_usub_with_overflow : Intrinsic<[llvm_anyint_ty,
844 LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>],
845 [LLVMMatchType<0>, LLVMMatchType<0>],
846 [IntrNoMem, IntrSpeculatable]>;
847
848 def int_smul_with_overflow : Intrinsic<[llvm_anyint_ty,
849 LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>],
850 [LLVMMatchType<0>, LLVMMatchType<0>],
851 [IntrNoMem, IntrSpeculatable]>;
852 def int_umul_with_overflow : Intrinsic<[llvm_anyint_ty,
853 LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>],
854 [LLVMMatchType<0>, LLVMMatchType<0>],
855 [IntrNoMem, IntrSpeculatable]>;
856
830 let IntrProperties = [IntrNoMem, IntrSpeculatable, IntrWillReturn] in {
831 def int_sadd_with_overflow : Intrinsic<[llvm_anyint_ty,
832 LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>],
833 [LLVMMatchType<0>, LLVMMatchType<0>]>;
834 def int_uadd_with_overflow : Intrinsic<[llvm_anyint_ty,
835 LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>],
836 [LLVMMatchType<0>, LLVMMatchType<0>]>;
837
838 def int_ssub_with_overflow : Intrinsic<[llvm_anyint_ty,
839 LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>],
840 [LLVMMatchType<0>, LLVMMatchType<0>]>;
841 def int_usub_with_overflow : Intrinsic<[llvm_anyint_ty,
842 LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>],
843 [LLVMMatchType<0>, LLVMMatchType<0>]>;
844
845 def int_smul_with_overflow : Intrinsic<[llvm_anyint_ty,
846 LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>],
847 [LLVMMatchType<0>, LLVMMatchType<0>]>;
848 def int_umul_with_overflow : Intrinsic<[llvm_anyint_ty,
849 LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>],
850 [LLVMMatchType<0>, LLVMMatchType<0>]>;
851 }
857852 //===------------------------- Saturation Arithmetic Intrinsics ---------------------===//
858853 //
859854 def int_sadd_sat : Intrinsic<[llvm_anyint_ty],
860855 [LLVMMatchType<0>, LLVMMatchType<0>],
861 [IntrNoMem, IntrSpeculatable, Commutative]>;
856 [IntrNoMem, IntrSpeculatable, IntrWillReturn, Commutative]>;
862857 def int_uadd_sat : Intrinsic<[llvm_anyint_ty],
863858 [LLVMMatchType<0>, LLVMMatchType<0>],
864 [IntrNoMem, IntrSpeculatable, Commutative]>;
859 [IntrNoMem, IntrSpeculatable, IntrWillReturn, Commutative]>;
865860 def int_ssub_sat : Intrinsic<[llvm_anyint_ty],
866861 [LLVMMatchType<0>, LLVMMatchType<0>],
867 [IntrNoMem, IntrSpeculatable]>;
862 [IntrNoMem, IntrSpeculatable, IntrWillReturn]>;
868863 def int_usub_sat : Intrinsic<[llvm_anyint_ty],
869864 [LLVMMatchType<0>, LLVMMatchType<0>],
870 [IntrNoMem, IntrSpeculatable]>;
865 [IntrNoMem, IntrSpeculatable, IntrWillReturn]>;
871866
872867 //===------------------------- Fixed Point Arithmetic Intrinsics ---------------------===//
873868 //
874869 def int_smul_fix : Intrinsic<[llvm_anyint_ty],
875870 [LLVMMatchType<0>, LLVMMatchType<0>, llvm_i32_ty],
876 [IntrNoMem, IntrSpeculatable, Commutative, ImmArg<2>]>;
871 [IntrNoMem, IntrSpeculatable, IntrWillReturn, Commutative, ImmArg<2>]>;
877872
878873 def int_umul_fix : Intrinsic<[llvm_anyint_ty],
879874 [LLVMMatchType<0>, LLVMMatchType<0>, llvm_i32_ty],
880 [IntrNoMem, IntrSpeculatable, Commutative, ImmArg<2>]>;
875 [IntrNoMem, IntrSpeculatable, IntrWillReturn, Commutative, ImmArg<2>]>;
881876
882877 //===------------------- Fixed Point Saturation Arithmetic Intrinsics ----------------===//
883878 //
884879 def int_smul_fix_sat : Intrinsic<[llvm_anyint_ty],
885880 [LLVMMatchType<0>, LLVMMatchType<0>, llvm_i32_ty],
886 [IntrNoMem, IntrSpeculatable, Commutative, ImmArg<2>]>;
881 [IntrNoMem, IntrSpeculatable, IntrWillReturn, Commutative, ImmArg<2>]>;
887882
888883 //===------------------------- Memory Use Markers -------------------------===//
889884 //
890885 def int_lifetime_start : Intrinsic<[],
891886 [llvm_i64_ty, llvm_anyptr_ty],
892 [IntrArgMemOnly, NoCapture<1>, ImmArg<0>]>;
887 [IntrArgMemOnly, IntrWillReturn, NoCapture<1>, ImmArg<0>]>;
893888 def int_lifetime_end : Intrinsic<[],
894889 [llvm_i64_ty, llvm_anyptr_ty],
895 [IntrArgMemOnly, NoCapture<1>, ImmArg<0>]>;
890 [IntrArgMemOnly, IntrWillReturn, NoCapture<1>, ImmArg<0>]>;
896891 def int_invariant_start : Intrinsic<[llvm_descriptor_ty],
897892 [llvm_i64_ty, llvm_anyptr_ty],
898 [IntrArgMemOnly, NoCapture<1>, ImmArg<0>]>;
893 [IntrArgMemOnly, IntrWillReturn, NoCapture<1>, ImmArg<0>]>;
899894 def int_invariant_end : Intrinsic<[],
900895 [llvm_descriptor_ty, llvm_i64_ty,
901896 llvm_anyptr_ty],
902 [IntrArgMemOnly, NoCapture<2>, ImmArg<1>]>;
897 [IntrArgMemOnly, IntrWillReturn, NoCapture<2>, ImmArg<1>]>;
903898
904899 // launder.invariant.group can't be marked with 'readnone' (IntrNoMem),
905900 // because it would cause CSE of two barriers with the same argument.
915910 // might change in the future.
916911 def int_launder_invariant_group : Intrinsic<[llvm_anyptr_ty],
917912 [LLVMMatchType<0>],
918 [IntrInaccessibleMemOnly, IntrSpeculatable]>;
913 [IntrInaccessibleMemOnly, IntrSpeculatable, IntrWillReturn]>;
919914
920915
921916 def int_strip_invariant_group : Intrinsic<[llvm_anyptr_ty],
922917 [LLVMMatchType<0>],
923 [IntrSpeculatable, IntrNoMem]>;
918 [IntrSpeculatable, IntrNoMem, IntrWillReturn]>;
924919
925920 //===------------------------ Stackmap Intrinsics -------------------------===//
926921 //
10201015 [IntrInaccessibleMemOnly]>;
10211016
10221017 // NOP: calls/invokes to this intrinsic are removed by codegen
1023 def int_donothing : Intrinsic<[], [], [IntrNoMem]>;
1018 def int_donothing : Intrinsic<[], [], [IntrNoMem, IntrWillReturn]>;
10241019
10251020 // This instruction has no actual effect, though it is treated by the optimizer
10261021 // has having opaque side effects. This may be inserted into loops to ensure
10291024 def int_sideeffect : Intrinsic<[], [], [IntrInaccessibleMemOnly]>;
10301025
10311026 // Intrisics to support half precision floating point format
1032 let IntrProperties = [IntrNoMem] in {
1027 let IntrProperties = [IntrNoMem, IntrWillReturn] in {
10331028 def int_convert_to_fp16 : Intrinsic<[llvm_i16_ty], [llvm_anyfloat_ty]>;
10341029 def int_convert_from_fp16 : Intrinsic<[llvm_anyfloat_ty], [llvm_i16_ty]>;
10351030 }
10401035 [], "llvm.clear_cache">;
10411036
10421037 // Intrinsic to detect whether its argument is a constant.
1043 def int_is_constant : Intrinsic<[llvm_i1_ty], [llvm_any_ty], [IntrNoMem], "llvm.is.constant">;
1038 def int_is_constant : Intrinsic<[llvm_i1_ty], [llvm_any_ty], [IntrNoMem, IntrWillReturn], "llvm.is.constant">;
10441039
10451040 //===-------------------------- Masked Intrinsics -------------------------===//
10461041 //
10481043 LLVMAnyPointerType>,
10491044 llvm_i32_ty,
10501045 LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>],
1051 [IntrArgMemOnly, ImmArg<2>]>;
1046 [IntrArgMemOnly, IntrWillReturn, ImmArg<2>]>;
10521047
10531048 def int_masked_load : Intrinsic<[llvm_anyvector_ty],
10541049 [LLVMAnyPointerType>, llvm_i32_ty,
10551050 LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>, LLVMMatchType<0>],
1056 [IntrReadMem, IntrArgMemOnly, ImmArg<1>]>;
1051 [IntrReadMem, IntrArgMemOnly, IntrWillReturn, ImmArg<1>]>;
10571052
10581053 def int_masked_gather: Intrinsic<[llvm_anyvector_ty],
10591054 [LLVMVectorOfAnyPointersToElt<0>, llvm_i32_ty,
10601055 LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>,
10611056 LLVMMatchType<0>],
1062 [IntrReadMem, ImmArg<1>]>;
1057 [IntrReadMem, IntrWillReturn, ImmArg<1>]>;
10631058
10641059 def int_masked_scatter: Intrinsic<[],
10651060 [llvm_anyvector_ty,
10661061 LLVMVectorOfAnyPointersToElt<0>, llvm_i32_ty,
10671062 LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>],
1068 [ImmArg<2>]>;
1063 [IntrWillReturn, ImmArg<2>]>;
10691064
10701065 def int_masked_expandload: Intrinsic<[llvm_anyvector_ty],
10711066 [LLVMPointerToElt<0>,
10721067 LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>,
10731068 LLVMMatchType<0>],
1074 [IntrReadMem]>;
1069 [IntrReadMem, IntrWillReturn]>;
10751070
10761071 def int_masked_compressstore: Intrinsic<[],
10771072 [llvm_anyvector_ty,
10781073 LLVMPointerToElt<0>,
10791074 LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>],
1080 [IntrArgMemOnly]>;
1075 [IntrArgMemOnly, IntrWillReturn]>;
10811076
10821077 // Test whether a pointer is associated with a type metadata identifier.
10831078 def int_type_test : Intrinsic<[llvm_i1_ty], [llvm_ptr_ty, llvm_metadata_ty],
1084 [IntrNoMem]>;
1079 [IntrNoMem, IntrWillReturn]>;
10851080
10861081 // Safely loads a function pointer from a virtual table pointer using type metadata.
10871082 def int_type_checked_load : Intrinsic<[llvm_ptr_ty, llvm_i1_ty],
10881083 [llvm_ptr_ty, llvm_i32_ty, llvm_metadata_ty],
1089 [IntrNoMem]>;
1084 [IntrNoMem, IntrWillReturn]>;
10901085
10911086 // Create a branch funnel that implements an indirect call to a limited set of
10921087 // callees. This needs to be a musttail call.
11201115 llvm_anyptr_ty, llvm_anyptr_ty, llvm_anyint_ty, llvm_i32_ty
11211116 ],
11221117 [
1123 IntrArgMemOnly, NoCapture<0>, NoCapture<1>, WriteOnly<0>,
1118 IntrArgMemOnly, IntrWillReturn, NoCapture<0>, NoCapture<1>, WriteOnly<0>,
11241119 ReadOnly<1>, ImmArg<3>
11251120 ]>;
11261121
11311126 llvm_anyptr_ty, llvm_anyptr_ty, llvm_anyint_ty, llvm_i32_ty
11321127 ],
11331128 [
1134 IntrArgMemOnly, NoCapture<0>, NoCapture<1>, WriteOnly<0>,
1129 IntrArgMemOnly, IntrWillReturn, NoCapture<0>, NoCapture<1>, WriteOnly<0>,
11351130 ReadOnly<1>, ImmArg<3>
11361131 ]>;
11371132
11381133 // @llvm.memset.element.unordered.atomic.*(dest, value, length, elementsize)
11391134 def int_memset_element_unordered_atomic
11401135 : Intrinsic<[], [ llvm_anyptr_ty, llvm_i8_ty, llvm_anyint_ty, llvm_i32_ty ],
1141 [ IntrArgMemOnly, NoCapture<0>, WriteOnly<0>, ImmArg<3> ]>;
1136 [ IntrArgMemOnly, IntrWillReturn, NoCapture<0>, WriteOnly<0>, ImmArg<3> ]>;
11421137
11431138 //===------------------------ Reduction Intrinsics ------------------------===//
11441139 //
1145 def int_experimental_vector_reduce_v2_fadd : Intrinsic<[llvm_anyfloat_ty],
1146 [LLVMMatchType<0>,
1147 llvm_anyvector_ty],
1148 [IntrNoMem]>;
1149 def int_experimental_vector_reduce_v2_fmul : Intrinsic<[llvm_anyfloat_ty],
1150 [LLVMMatchType<0>,
1151 llvm_anyvector_ty],
1152 [IntrNoMem]>;
1153 def int_experimental_vector_reduce_add : Intrinsic<[LLVMVectorElementType<0>],
1154 [llvm_anyvector_ty],
1155 [IntrNoMem]>;
1156 def int_experimental_vector_reduce_mul : Intrinsic<[LLVMVectorElementType<0>],
1157 [llvm_anyvector_ty],
1158 [IntrNoMem]>;
1159 def int_experimental_vector_reduce_and : Intrinsic<[LLVMVectorElementType<0>],
1160 [llvm_anyvector_ty],
1161 [IntrNoMem]>;
1162 def int_experimental_vector_reduce_or : Intrinsic<[LLVMVectorElementType<0>],
1163 [llvm_anyvector_ty],
1164 [IntrNoMem]>;
1165 def int_experimental_vector_reduce_xor : Intrinsic<[LLVMVectorElementType<0>],
1166 [llvm_anyvector_ty],
1167 [IntrNoMem]>;
1168 def int_experimental_vector_reduce_smax : Intrinsic<[LLVMVectorElementType<0>],
1169 [llvm_anyvector_ty],
1170 [IntrNoMem]>;
1171 def int_experimental_vector_reduce_smin : Intrinsic<[LLVMVectorElementType<0>],
1172 [llvm_anyvector_ty],
1173 [IntrNoMem]>;
1174 def int_experimental_vector_reduce_umax : Intrinsic<[LLVMVectorElementType<0>],
1175 [llvm_anyvector_ty],
1176 [IntrNoMem]>;
1177 def int_experimental_vector_reduce_umin : Intrinsic<[LLVMVectorElementType<0>],
1178 [llvm_anyvector_ty],
1179 [IntrNoMem]>;
1180 def int_experimental_vector_reduce_fmax : Intrinsic<[LLVMVectorElementType<0>],
1181 [llvm_anyvector_ty],
1182 [IntrNoMem]>;
1183 def int_experimental_vector_reduce_fmin : Intrinsic<[LLVMVectorElementType<0>],
1184 [llvm_anyvector_ty],
1185 [IntrNoMem]>;
1140 let IntrProperties = [IntrNoMem, IntrWillReturn] in {
1141 def int_experimental_vector_reduce_v2_fadd : Intrinsic<[llvm_anyfloat_ty],
1142 [LLVMMatchType<0>,
1143 llvm_anyvector_ty]>;
1144 def int_experimental_vector_reduce_v2_fmul : Intrinsic<[llvm_anyfloat_ty],
1145 [LLVMMatchType<0>,
1146 llvm_anyvector_ty]>;
1147 def int_experimental_vector_reduce_add : Intrinsic<[LLVMVectorElementType<0>],
1148 [llvm_anyvector_ty]>;
1149 def int_experimental_vector_reduce_mul : Intrinsic<[LLVMVectorElementType<0>],
1150 [llvm_anyvector_ty]>;
1151 def int_experimental_vector_reduce_and : Intrinsic<[LLVMVectorElementType<0>],
1152 [llvm_anyvector_ty]>;
1153 def int_experimental_vector_reduce_or : Intrinsic<[LLVMVectorElementType<0>],
1154 [llvm_anyvector_ty]>;
1155 def int_experimental_vector_reduce_xor : Intrinsic<[LLVMVectorElementType<0>],
1156 [llvm_anyvector_ty]>;
1157 def int_experimental_vector_reduce_smax : Intrinsic<[LLVMVectorElementType<0>],
1158 [llvm_anyvector_ty]>;
1159 def int_experimental_vector_reduce_smin : Intrinsic<[LLVMVectorElementType<0>],
1160 [llvm_anyvector_ty]>;
1161 def int_experimental_vector_reduce_umax : Intrinsic<[LLVMVectorElementType<0>],
1162 [llvm_anyvector_ty]>;
1163 def int_experimental_vector_reduce_umin : Intrinsic<[LLVMVectorElementType<0>],
1164 [llvm_anyvector_ty]>;
1165 def int_experimental_vector_reduce_fmax : Intrinsic<[LLVMVectorElementType<0>],
1166 [llvm_anyvector_ty]>;
1167 def int_experimental_vector_reduce_fmin : Intrinsic<[LLVMVectorElementType<0>],
1168 [llvm_anyvector_ty]>;
1169 }
11861170
11871171 //===---------- Intrinsics to control hardware supported loops ----------===//
11881172
363363 call void @an_argmemonly_func(i8* %q) #9 [ "unknown"() ]
364364 ret void
365365
366 ; CHECK: Just Ref: Ptr: i8* %p <-> call void @a_readonly_func(i8* %p) #6 [ "unknown"() ]
367 ; CHECK: Just Ref: Ptr: i8* %q <-> call void @a_readonly_func(i8* %p) #6 [ "unknown"() ]
368 ; CHECK: NoModRef: Ptr: i8* %p <-> call void @an_inaccessiblememonly_func() #7 [ "unknown"() ]
369 ; CHECK: NoModRef: Ptr: i8* %q <-> call void @an_inaccessiblememonly_func() #7 [ "unknown"() ]
370 ; CHECK: NoModRef: Ptr: i8* %p <-> call void @an_inaccessibleorargmemonly_func(i8* %q) #8 [ "unknown"() ]
371 ; CHECK: Both ModRef (MustAlias): Ptr: i8* %q <-> call void @an_inaccessibleorargmemonly_func(i8* %q) #8 [ "unknown"() ]
372 ; CHECK: NoModRef: Ptr: i8* %p <-> call void @an_argmemonly_func(i8* %q) #9 [ "unknown"() ]
373 ; CHECK: Both ModRef (MustAlias): Ptr: i8* %q <-> call void @an_argmemonly_func(i8* %q) #9 [ "unknown"() ]
374 ; CHECK: Just Ref: call void @a_readonly_func(i8* %p) #6 [ "unknown"() ] <-> call void @an_inaccessiblememonly_func() #7 [ "unknown"() ]
375 ; CHECK: Just Ref: call void @a_readonly_func(i8* %p) #6 [ "unknown"() ] <-> call void @an_inaccessibleorargmemonly_func(i8* %q) #8 [ "unknown"() ]
376 ; CHECK: Just Ref: call void @a_readonly_func(i8* %p) #6 [ "unknown"() ] <-> call void @an_argmemonly_func(i8* %q) #9 [ "unknown"() ]
377 ; CHECK: Both ModRef: call void @an_inaccessiblememonly_func() #7 [ "unknown"() ] <-> call void @a_readonly_func(i8* %p) #6 [ "unknown"() ]
378 ; CHECK: Both ModRef: call void @an_inaccessiblememonly_func() #7 [ "unknown"() ] <-> call void @an_inaccessibleorargmemonly_func(i8* %q) #8 [ "unknown"() ]
379 ; CHECK: NoModRef: call void @an_inaccessiblememonly_func() #7 [ "unknown"() ] <-> call void @an_argmemonly_func(i8* %q) #9 [ "unknown"() ]
380 ; CHECK: Both ModRef: call void @an_inaccessibleorargmemonly_func(i8* %q) #8 [ "unknown"() ] <-> call void @a_readonly_func(i8* %p) #6 [ "unknown"() ]
381 ; CHECK: Both ModRef: call void @an_inaccessibleorargmemonly_func(i8* %q) #8 [ "unknown"() ] <-> call void @an_inaccessiblememonly_func() #7 [ "unknown"() ]
382 ; CHECK: Both ModRef (MustAlias): call void @an_inaccessibleorargmemonly_func(i8* %q) #8 [ "unknown"() ] <-> call void @an_argmemonly_func(i8* %q) #9 [ "unknown"() ]
383 ; CHECK: Both ModRef: call void @an_argmemonly_func(i8* %q) #9 [ "unknown"() ] <-> call void @a_readonly_func(i8* %p) #6 [ "unknown"() ]
384 ; CHECK: NoModRef: call void @an_argmemonly_func(i8* %q) #9 [ "unknown"() ] <-> call void @an_inaccessiblememonly_func() #7 [ "unknown"() ]
385 ; CHECK: Both ModRef (MustAlias): call void @an_argmemonly_func(i8* %q) #9 [ "unknown"() ] <-> call void @an_inaccessibleorargmemonly_func(i8* %q) #8 [ "unknown"() ]
366 ; CHECK: Just Ref: Ptr: i8* %p <-> call void @a_readonly_func(i8* %p) #7 [ "unknown"() ]
367 ; CHECK: Just Ref: Ptr: i8* %q <-> call void @a_readonly_func(i8* %p) #7 [ "unknown"() ]
368 ; CHECK: NoModRef: Ptr: i8* %p <-> call void @an_inaccessiblememonly_func() #8 [ "unknown"() ]
369 ; CHECK: NoModRef: Ptr: i8* %q <-> call void @an_inaccessiblememonly_func() #8 [ "unknown"() ]
370 ; CHECK: NoModRef: Ptr: i8* %p <-> call void @an_inaccessibleorargmemonly_func(i8* %q) #9 [ "unknown"() ]
371 ; CHECK: Both ModRef (MustAlias): Ptr: i8* %q <-> call void @an_inaccessibleorargmemonly_func(i8* %q) #9 [ "unknown"() ]
372 ; CHECK: NoModRef: Ptr: i8* %p <-> call void @an_argmemonly_func(i8* %q) #10 [ "unknown"() ]
373 ; CHECK: Both ModRef (MustAlias): Ptr: i8* %q <-> call void @an_argmemonly_func(i8* %q) #10 [ "unknown"() ]
374 ; CHECK: Just Ref: call void @a_readonly_func(i8* %p) #7 [ "unknown"() ] <-> call void @an_inaccessiblememonly_func() #8 [ "unknown"() ]
375 ; CHECK: Just Ref: call void @a_readonly_func(i8* %p) #7 [ "unknown"() ] <-> call void @an_inaccessibleorargmemonly_func(i8* %q) #9 [ "unknown"() ]
376 ; CHECK: Just Ref: call void @a_readonly_func(i8* %p) #7 [ "unknown"() ] <-> call void @an_argmemonly_func(i8* %q) #10 [ "unknown"() ]
377 ; CHECK: Both ModRef: call void @an_inaccessiblememonly_func() #8 [ "unknown"() ] <-> call void @a_readonly_func(i8* %p) #7 [ "unknown"() ]
378 ; CHECK: Both ModRef: call void @an_inaccessiblememonly_func() #8 [ "unknown"() ] <-> call void @an_inaccessibleorargmemonly_func(i8* %q) #9 [ "unknown"() ]
379 ; CHECK: NoModRef: call void @an_inaccessiblememonly_func() #8 [ "unknown"() ] <-> call void @an_argmemonly_func(i8* %q) #10 [ "unknown"() ]
380 ; CHECK: Both ModRef: call void @an_inaccessibleorargmemonly_func(i8* %q) #9 [ "unknown"() ] <-> call void @a_readonly_func(i8* %p) #7 [ "unknown"() ]
381 ; CHECK: Both ModRef: call void @an_inaccessibleorargmemonly_func(i8* %q) #9 [ "unknown"() ] <-> call void @an_inaccessiblememonly_func() #8 [ "unknown"() ]
382 ; CHECK: Both ModRef (MustAlias): call void @an_inaccessibleorargmemonly_func(i8* %q) #9 [ "unknown"() ] <-> call void @an_argmemonly_func(i8* %q) #10 [ "unknown"() ]
383 ; CHECK: Both ModRef: call void @an_argmemonly_func(i8* %q) #10 [ "unknown"() ] <-> call void @a_readonly_func(i8* %p) #7 [ "unknown"() ]
384 ; CHECK: NoModRef: call void @an_argmemonly_func(i8* %q) #10 [ "unknown"() ] <-> call void @an_inaccessiblememonly_func() #8 [ "unknown"() ]
385 ; CHECK: Both ModRef (MustAlias): call void @an_argmemonly_func(i8* %q) #10 [ "unknown"() ] <-> call void @an_inaccessibleorargmemonly_func(i8* %q) #9 [ "unknown"() ]
386386 }
387387
388388 attributes #0 = { argmemonly nounwind }
2121 declare <8 x i16> @llvm.masked.load.v8i16.p0v8i16(<8 x i16>*, i32, <8 x i1>, <8 x i16>) nounwind readonly
2222 declare void @llvm.masked.store.v8i16.p0v8i16(<8 x i16>, <8 x i16>*, i32, <8 x i1>) nounwind
2323
24 ; CHECK: attributes #0 = { argmemonly nounwind readonly }
25 ; CHECK: attributes #1 = { argmemonly nounwind }
24 ; CHECK: attributes #0 = { argmemonly nounwind readonly willreturn }
25 ; CHECK: attributes #1 = { argmemonly nounwind willreturn }
2626 ; CHECK: attributes [[ATTR]] = { nounwind }
7777 ; CHECK: attributes #3 = { nounwind }
7878 ; CHECK: attributes #4 = { nounwind readnone }
7979 ; CHECK: attributes #5 = { nofree norecurse nounwind }
80 ; CHECK: attributes #6 = { argmemonly nounwind }
80 ; CHECK: attributes #6 = { argmemonly nounwind willreturn }
8181
8282 ; Root note.
8383 !0 = !{ }
2121 declare <8 x i16> @llvm.masked.load.v8i16.p0v8i16(<8 x i16>*, i32, <8 x i1>, <8 x i16>) nounwind readonly
2222 declare void @llvm.masked.store.v8i16.p0v8i16(<8 x i16>, <8 x i16>*, i32, <8 x i1>) nounwind
2323
24 ; CHECK: attributes #0 = { argmemonly nounwind readonly }
25 ; CHECK: attributes #1 = { argmemonly nounwind }
24 ; CHECK: attributes #0 = { argmemonly nounwind readonly willreturn }
25 ; CHECK: attributes #1 = { argmemonly nounwind willreturn }
2626 ; CHECK: attributes [[NUW]] = { nounwind }
2727
2828 !0 = !{!"tbaa root"}
1717 ; CHECK: ; Function Attrs: nounwind readnone speculatable
1818 ; CHECK-NEXT: declare void @llvm.dbg.value(metadata, metadata, metadata) #0
1919
20 ; CHECK: attributes #0 = { nounwind readnone speculatable }
20 ; CHECK: attributes #0 = { nounwind readnone speculatable willreturn }
2121
2222 ; CHECK: !llvm.dbg.cu = !{!0}
2323 ; CHECK-NEXT: !FooType = !{!16}
980980 ; CHECK: select <2 x i1> , <2 x i8> , <2 x i8>
981981
982982 call void @f.nobuiltin() builtin
983 ; CHECK: call void @f.nobuiltin() #34
983 ; CHECK: call void @f.nobuiltin() #35
984984
985985 call fastcc noalias i32* @f.noalias() noinline
986986 ; CHECK: call fastcc noalias i32* @f.noalias() #11
11781178 ; CHECK: attributes #26 = { sspstrong }
11791179 ; CHECK: attributes #27 = { uwtable }
11801180 ; CHECK: attributes #28 = { "cpu"="cortex-a8" }
1181 ; CHECK: attributes #29 = { nounwind readnone }
1181 ; CHECK: attributes #29 = { nounwind readnone willreturn }
11821182 ; CHECK: attributes #30 = { argmemonly nounwind readonly }
11831183 ; CHECK: attributes #31 = { argmemonly nounwind }
1184 ; CHECK: attributes #32 = { nounwind readonly }
1185 ; CHECK: attributes #33 = { inaccessiblemem_or_argmemonly nounwind }
1186 ; CHECK: attributes #34 = { builtin }
1184 ; CHECK: attributes #32 = { nounwind readnone }
1185 ; CHECK: attributes #33 = { nounwind readonly }
1186 ; CHECK: attributes #34 = { inaccessiblemem_or_argmemonly nounwind willreturn }
1187 ; CHECK: attributes #35 = { builtin }
11871188
11881189 ;; Metadata
11891190
10211021 ; CHECK: select <2 x i1> , <2 x i8> , <2 x i8>
10221022
10231023 call void @f.nobuiltin() builtin
1024 ; CHECK: call void @f.nobuiltin() #37
1024 ; CHECK: call void @f.nobuiltin() #38
10251025
10261026 call fastcc noalias i32* @f.noalias() noinline
10271027 ; CHECK: call fastcc noalias i32* @f.noalias() #12
12411241 ; CHECK: attributes #29 = { "thunk" }
12421242 ; CHECK: attributes #30 = { uwtable }
12431243 ; CHECK: attributes #31 = { "cpu"="cortex-a8" }
1244 ; CHECK: attributes #32 = { nounwind readnone }
1244 ; CHECK: attributes #32 = { nounwind readnone willreturn }
12451245 ; CHECK: attributes #33 = { argmemonly nounwind readonly }
12461246 ; CHECK: attributes #34 = { argmemonly nounwind }
1247 ; CHECK: attributes #35 = { nounwind readonly }
1248 ; CHECK: attributes #36 = { inaccessiblemem_or_argmemonly nounwind }
1249 ; CHECK: attributes #37 = { builtin }
1247 ; CHECK: attributes #35 = { nounwind readnone }
1248 ; CHECK: attributes #36 = { nounwind readonly }
1249 ; CHECK: attributes #37 = { inaccessiblemem_or_argmemonly nounwind willreturn }
1250 ; CHECK: attributes #38 = { builtin }
12501251
12511252 ;; Metadata
12521253
11691169 ; CHECK: select <2 x i1> , <2 x i8> , <2 x i8>
11701170
11711171 call void @f.nobuiltin() builtin
1172 ; CHECK: call void @f.nobuiltin() #40
1172 ; CHECK: call void @f.nobuiltin() #41
11731173
11741174 call fastcc noalias i32* @f.noalias() noinline
11751175 ; CHECK: call fastcc noalias i32* @f.noalias() #12
15511551 ; CHECK: attributes #32 = { norecurse }
15521552 ; CHECK: attributes #33 = { inaccessiblememonly }
15531553 ; CHECK: attributes #34 = { inaccessiblemem_or_argmemonly }
1554 ; CHECK: attributes #35 = { nounwind readnone }
1554 ; CHECK: attributes #35 = { nounwind readnone willreturn }
15551555 ; CHECK: attributes #36 = { argmemonly nounwind readonly }
15561556 ; CHECK: attributes #37 = { argmemonly nounwind }
1557 ; CHECK: attributes #38 = { nounwind readonly }
1558 ; CHECK: attributes #39 = { inaccessiblemem_or_argmemonly nounwind }
1559 ; CHECK: attributes #40 = { builtin }
1557 ; CHECK: attributes #38 = { nounwind readnone }
1558 ; CHECK: attributes #39 = { nounwind readonly }
1559 ; CHECK: attributes #40 = { inaccessiblemem_or_argmemonly nounwind willreturn }
1560 ; CHECK: attributes #41 = { builtin }
15601561
15611562 ;; Metadata
15621563
12401240 ; CHECK: select <2 x i1> , <2 x i8> , <2 x i8>
12411241
12421242 call void @f.nobuiltin() builtin
1243 ; CHECK: call void @f.nobuiltin() #41
1243 ; CHECK: call void @f.nobuiltin() #42
12441244
12451245 call fastcc noalias i32* @f.noalias() noinline
12461246 ; CHECK: call fastcc noalias i32* @f.noalias() #12
15871587 }
15881588
15891589 declare void @f.writeonly() writeonly
1590 ; CHECK: declare void @f.writeonly() #39
1590 ; CHECK: declare void @f.writeonly() #40
15911591
15921592 ; CHECK: attributes #0 = { alignstack=4 }
15931593 ; CHECK: attributes #1 = { alignstack=8 }
16241624 ; CHECK: attributes #32 = { norecurse }
16251625 ; CHECK: attributes #33 = { inaccessiblememonly }
16261626 ; CHECK: attributes #34 = { inaccessiblemem_or_argmemonly }
1627 ; CHECK: attributes #35 = { nounwind readnone }
1627 ; CHECK: attributes #35 = { nounwind readnone willreturn }
16281628 ; CHECK: attributes #36 = { argmemonly nounwind readonly }
16291629 ; CHECK: attributes #37 = { argmemonly nounwind }
1630 ; CHECK: attributes #38 = { nounwind readonly }
1631 ; CHECK: attributes #39 = { writeonly }
1632 ; CHECK: attributes #40 = { inaccessiblemem_or_argmemonly nounwind }
1633 ; CHECK: attributes #41 = { builtin }
1630 ; CHECK: attributes #38 = { nounwind readnone }
1631 ; CHECK: attributes #39 = { nounwind readonly }
1632 ; CHECK: attributes #40 = { writeonly }
1633 ; CHECK: attributes #41 = { inaccessiblemem_or_argmemonly nounwind willreturn }
1634 ; CHECK: attributes #42 = { builtin }
16341635
16351636 ;; Metadata
16361637
12401240 ; CHECK: select <2 x i1> , <2 x i8> , <2 x i8>
12411241
12421242 call void @f.nobuiltin() builtin
1243 ; CHECK: call void @f.nobuiltin() #41
1243 ; CHECK: call void @f.nobuiltin() #42
12441244
12451245 call fastcc noalias i32* @f.noalias() noinline
12461246 ; CHECK: call fastcc noalias i32* @f.noalias() #12
16051605
16061606
16071607 declare void @f.writeonly() writeonly
1608 ; CHECK: declare void @f.writeonly() #39
1608 ; CHECK: declare void @f.writeonly() #40
16091609
16101610 ;; Constant Expressions
16111611
16491649 ; CHECK: attributes #32 = { norecurse }
16501650 ; CHECK: attributes #33 = { inaccessiblememonly }
16511651 ; CHECK: attributes #34 = { inaccessiblemem_or_argmemonly }
1652 ; CHECK: attributes #35 = { nounwind readnone }
1652 ; CHECK: attributes #35 = { nounwind readnone willreturn }
16531653 ; CHECK: attributes #36 = { argmemonly nounwind readonly }
16541654 ; CHECK: attributes #37 = { argmemonly nounwind }
1655 ; CHECK: attributes #38 = { nounwind readonly }
1656 ; CHECK: attributes #39 = { writeonly }
1657 ; CHECK: attributes #40 = { inaccessiblemem_or_argmemonly nounwind }
1658 ; CHECK: attributes #41 = { builtin }
1655 ; CHECK: attributes #38 = { nounwind readnone }
1656 ; CHECK: attributes #39 = { nounwind readonly }
1657 ; CHECK: attributes #40 = { writeonly }
1658 ; CHECK: attributes #41 = { inaccessiblemem_or_argmemonly nounwind willreturn }
1659 ; CHECK: attributes #42 = { builtin }
16591660
16601661 ;; Metadata
16611662
12471247 ; CHECK: select <2 x i1> , <2 x i8> , <2 x i8>
12481248
12491249 call void @f.nobuiltin() builtin
1250 ; CHECK: call void @f.nobuiltin() #42
1250 ; CHECK: call void @f.nobuiltin() #43
12511251
12521252 call void @f.strictfp() strictfp
1253 ; CHECK: call void @f.strictfp() #43
1253 ; CHECK: call void @f.strictfp() #44
12541254
12551255 call fastcc noalias i32* @f.noalias() noinline
12561256 ; CHECK: call fastcc noalias i32* @f.noalias() #12
16151615
16161616
16171617 declare void @f.writeonly() writeonly
1618 ; CHECK: declare void @f.writeonly() #39
1618 ; CHECK: declare void @f.writeonly() #40
16191619
16201620 declare void @f.speculatable() speculatable
1621 ; CHECK: declare void @f.speculatable() #40
1621 ; CHECK: declare void @f.speculatable() #41
16221622
16231623 ;; Constant Expressions
16241624
16621662 ; CHECK: attributes #32 = { norecurse }
16631663 ; CHECK: attributes #33 = { inaccessiblememonly }
16641664 ; CHECK: attributes #34 = { inaccessiblemem_or_argmemonly }
1665 ; CHECK: attributes #35 = { nounwind readnone }
1665 ; CHECK: attributes #35 = { nounwind readnone willreturn }
16661666 ; CHECK: attributes #36 = { argmemonly nounwind readonly }
16671667 ; CHECK: attributes #37 = { argmemonly nounwind }
1668 ; CHECK: attributes #38 = { nounwind readonly }
1669 ; CHECK: attributes #39 = { writeonly }
1670 ; CHECK: attributes #40 = { speculatable }
1671 ; CHECK: attributes #41 = { inaccessiblemem_or_argmemonly nounwind }
1672 ; CHECK: attributes #42 = { builtin }
1673 ; CHECK: attributes #43 = { strictfp }
1668 ; CHECK: attributes #38 = { nounwind readnone }
1669 ; CHECK: attributes #39 = { nounwind readonly }
1670 ; CHECK: attributes #40 = { writeonly }
1671 ; CHECK: attributes #41 = { speculatable }
1672 ; CHECK: attributes #42 = { inaccessiblemem_or_argmemonly nounwind willreturn }
1673 ; CHECK: attributes #43 = { builtin }
1674 ; CHECK: attributes #44 = { strictfp }
16741675
16751676 ;; Metadata
16761677
12581258 ; CHECK: select <2 x i1> , <2 x i8> , <2 x i8>
12591259
12601260 call void @f.nobuiltin() builtin
1261 ; CHECK: call void @f.nobuiltin() #42
1261 ; CHECK: call void @f.nobuiltin() #43
12621262
12631263 call void @f.strictfp() strictfp
1264 ; CHECK: call void @f.strictfp() #43
1264 ; CHECK: call void @f.strictfp() #44
12651265
12661266 call fastcc noalias i32* @f.noalias() noinline
12671267 ; CHECK: call fastcc noalias i32* @f.noalias() #12
16261626
16271627
16281628 declare void @f.writeonly() writeonly
1629 ; CHECK: declare void @f.writeonly() #39
1629 ; CHECK: declare void @f.writeonly() #40
16301630
16311631 declare void @f.speculatable() speculatable
1632 ; CHECK: declare void @f.speculatable() #40
1632 ; CHECK: declare void @f.speculatable() #41
16331633
16341634 ;; Constant Expressions
16351635
16731673 ; CHECK: attributes #32 = { norecurse }
16741674 ; CHECK: attributes #33 = { inaccessiblememonly }
16751675 ; CHECK: attributes #34 = { inaccessiblemem_or_argmemonly }
1676 ; CHECK: attributes #35 = { nounwind readnone }
1676 ; CHECK: attributes #35 = { nounwind readnone willreturn }
16771677 ; CHECK: attributes #36 = { argmemonly nounwind readonly }
16781678 ; CHECK: attributes #37 = { argmemonly nounwind }
1679 ; CHECK: attributes #38 = { nounwind readonly }
1680 ; CHECK: attributes #39 = { writeonly }
1681 ; CHECK: attributes #40 = { speculatable }
1682 ; CHECK: attributes #41 = { inaccessiblemem_or_argmemonly nounwind }
1683 ; CHECK: attributes #42 = { builtin }
1684 ; CHECK: attributes #43 = { strictfp }
1679 ; CHECK: attributes #38 = { nounwind readnone }
1680 ; CHECK: attributes #39 = { nounwind readonly }
1681 ; CHECK: attributes #40 = { writeonly }
1682 ; CHECK: attributes #41 = { speculatable }
1683 ; CHECK: attributes #42 = { inaccessiblemem_or_argmemonly nounwind willreturn }
1684 ; CHECK: attributes #43 = { builtin }
1685 ; CHECK: attributes #44 = { strictfp }
16851686
16861687 ;; Metadata
16871688
13501350 ; CHECK: select <2 x i1> , <2 x i8> , <2 x i8>
13511351
13521352 call void @f.nobuiltin() builtin
1353 ; CHECK: call void @f.nobuiltin() #42
1353 ; CHECK: call void @f.nobuiltin() #43
13541354
13551355 call void @f.strictfp() strictfp
1356 ; CHECK: call void @f.strictfp() #43
1356 ; CHECK: call void @f.strictfp() #44
13571357
13581358 call fastcc noalias i32* @f.noalias() noinline
13591359 ; CHECK: call fastcc noalias i32* @f.noalias() #12
17181718
17191719
17201720 declare void @f.writeonly() writeonly
1721 ; CHECK: declare void @f.writeonly() #40
1721 ; CHECK: declare void @f.writeonly() #41
17221722
17231723 declare void @f.speculatable() speculatable
1724 ; CHECK: declare void @f.speculatable() #41
1724 ; CHECK: declare void @f.speculatable() #42
17251725
17261726 ;; Constant Expressions
17271727
17781778 ; CHECK: attributes #32 = { norecurse }
17791779 ; CHECK: attributes #33 = { inaccessiblememonly }
17801780 ; CHECK: attributes #34 = { inaccessiblemem_or_argmemonly }
1781 ; CHECK: attributes #35 = { nounwind readnone }
1781 ; CHECK: attributes #35 = { nounwind readnone willreturn }
17821782 ; CHECK: attributes #36 = { argmemonly nounwind readonly }
17831783 ; CHECK: attributes #37 = { argmemonly nounwind }
1784 ; CHECK: attributes #38 = { nounwind readonly }
1785 ; CHECK: attributes #39 = { inaccessiblemem_or_argmemonly nounwind }
1786 ; CHECK: attributes #40 = { writeonly }
1787 ; CHECK: attributes #41 = { speculatable }
1788 ; CHECK: attributes #42 = { builtin }
1789 ; CHECK: attributes #43 = { strictfp }
1784 ; CHECK: attributes #38 = { nounwind readnone }
1785 ; CHECK: attributes #39 = { nounwind readonly }
1786 ; CHECK: attributes #40 = { inaccessiblemem_or_argmemonly nounwind willreturn }
1787 ; CHECK: attributes #41 = { writeonly }
1788 ; CHECK: attributes #42 = { speculatable }
1789 ; CHECK: attributes #43 = { builtin }
1790 ; CHECK: attributes #44 = { strictfp }
17901791
17911792 ;; Metadata
17921793
9797 ret i32 addrspace(3)* addrspacecast (i32 addrspace(4)* getelementptr ([256 x i32], [256 x i32] addrspace(4)* addrspacecast ([256 x i32] addrspace(3)* @lds.arr to [256 x i32] addrspace(4)*), i64 0, i64 8) to i32 addrspace(3)*)
9898 }
9999
100 ; HSA: attributes #0 = { argmemonly nounwind }
100 ; HSA: attributes #0 = { argmemonly nounwind willreturn }
101101 ; HSA: attributes #1 = { nounwind }
102102 ; HSA: attributes #2 = { nounwind "amdgpu-queue-ptr" }
103103
6868 ret void
6969 }
7070
71 ; CHECK: attributes #0 = { nounwind readnone speculatable }
71 ; CHECK: attributes #0 = { nounwind readnone speculatable willreturn }
7272 ; CHECK: attributes #1 = { cold noreturn nounwind }
9191 declare void @useBool(i1)
9292
9393 declare void @clobber(i8*)
94 ; CHECK: Function Attrs: inaccessiblememonly nounwind speculatable{{$}}
94 ; CHECK: Function Attrs: inaccessiblememonly nounwind speculatable willreturn{{$}}
9595 ; CHECK-NEXT: declare i8* @llvm.launder.invariant.group.p0i8(i8*)
9696 declare i8* @llvm.launder.invariant.group.p0i8(i8*)
9797
98 ; CHECK: Function Attrs: nounwind readnone speculatable{{$}}
98 ; CHECK: Function Attrs: nounwind readnone speculatable willreturn{{$}}
9999 ; CHECK-NEXT: declare i8* @llvm.strip.invariant.group.p0i8(i8*)
100100 declare i8* @llvm.strip.invariant.group.p0i8(i8*)
101101
3838 declare void @llvm.dbg.value(metadata, metadata, metadata) nounwind readnone
3939
4040 ; CHECK: attributes #0 = { nounwind ssp }
41 ; CHECK: attributes #1 = { nounwind readnone speculatable }
41 ; CHECK: attributes #1 = { nounwind readnone speculatable willreturn }
4242 ; CHECK: attributes #2 = { noinline nounwind ssp }
4343 ; CHECK: attributes [[NUW]] = { nounwind }
4444
507507 ; CHECK-NEXT: store i8 97, i8* [[ARRAYIDX]], align 1
508508 ; CHECK-NEXT: [[ARRAYIDX1:%.*]] = getelementptr inbounds [2 x i8], [2 x i8]* [[X]], i64 0, i64 1
509509 ; CHECK-NEXT: store i8 0, i8* [[ARRAYIDX1]], align 1
510 ; CHECK-NEXT: [[CALL:%.*]] = call i8* @strdup(i8* [[ARRAYIDX]]) #1
510 ; CHECK-NEXT: [[CALL:%.*]] = call i8* @strdup(i8* [[ARRAYIDX]]) #2
511511 ; CHECK-NEXT: ret i8* [[CALL]]
512512 ;
513513 %x = alloca [2 x i8], align 1
545545 ; CHECK-NEXT: [[P_4:%.*]] = getelementptr i8, i8* [[P:%.*]], i64 4
546546 ; CHECK-NEXT: [[TMP:%.*]] = load i8, i8* [[P_4]], align 1
547547 ; CHECK-NEXT: store i8 0, i8* [[P_4]], align 1
548 ; CHECK-NEXT: [[Q:%.*]] = call i8* @strdup(i8* [[P]]) #4
548 ; CHECK-NEXT: [[Q:%.*]] = call i8* @strdup(i8* [[P]]) #5
549549 ; CHECK-NEXT: store i8 [[TMP]], i8* [[P_4]], align 1
550550 ; CHECK-NEXT: ret i8* [[Q]]
551551 ;
344344 ; CHECK: attributes [[NUW]] = { nounwind }
345345 ; CHECK: attributes #1 = { nounwind readnone }
346346 ; CHECK: attributes #2 = { ssp uwtable }
347 ; CHECK: attributes #3 = { argmemonly nounwind }
347 ; CHECK: attributes #3 = { argmemonly nounwind willreturn }
348348 ; CHECK: attributes #4 = { noreturn nounwind }
3131 ; CHECK: ret void
3232 ; CHECK: }
3333
34 attributes #0 = { nounwind argmemonly }
34 attributes #0 = { nounwind argmemonly willreturn }
3535 attributes #1 = { nounwind }
3636 attributes #2 = { nounwind uwtable }
3737
247247 declare void @f2(%struct.big*)
248248
249249 ; CHECK: attributes [[$NUW]] = { nounwind }
250 ; CHECK: attributes #1 = { argmemonly nounwind }
250 ; CHECK: attributes #1 = { argmemonly nounwind willreturn }
251251 ; CHECK: attributes #2 = { nounwind ssp }
252252 ; CHECK: attributes #3 = { nounwind ssp uwtable }
30693069 !5 = !{i32 2, !"Debug Info Version", i32 3}
30703070
30713071 ; CHECK: attributes [[NUW]] = { nounwind }
3072 ; CHECK: attributes #1 = { nounwind readnone speculatable }
3072 ; CHECK: attributes #1 = { nounwind readnone speculatable willreturn }
30733073 ; CHECK: ![[RELEASE]] = !{}
104104 declare void @llvm.dbg.value(metadata, metadata, metadata) nounwind readnone
105105
106106 ; CHECK: attributes #0 = { ssp uwtable }
107 ; CHECK: attributes #1 = { nounwind readnone speculatable }
107 ; CHECK: attributes #1 = { nounwind readnone speculatable willreturn }
108108 ; CHECK: attributes #2 = { nonlazybind }
109109 ; CHECK: attributes [[NUW]] = { nounwind }
110110 ; CHECK: attributes #4 = { noinline ssp uwtable }
820820
821821
822822 ; CHECK: attributes [[NUW]] = { nounwind }
823 ; CHECK: attributes #1 = { argmemonly nounwind }
823 ; CHECK: attributes #1 = { argmemonly nounwind willreturn }
824824 ; CHECK: attributes #2 = { nonlazybind }
172172 ; CHECK: declare <2 x double> @llvm.pow.v2f64(<2 x double>, <2 x double>) [[ATTR0]]
173173 ; CHECK: declare <2 x double> @llvm.exp2.v2f64(<2 x double>) [[ATTR0]]
174174
175 ; CHECK: attributes [[ATTR0]] = { nounwind readnone speculatable }
175 ; CHECK: attributes [[ATTR0]] = { nounwind readnone speculatable willreturn }
176176
1111 ; attached to the FP intrinsic.
1212 ; CHECK1: declare double @llvm.experimental.constrained.fadd.f64(double, double, metadata, metadata) #[[ATTR:[0-9]+]]
1313 ; CHECK1: declare double @llvm.experimental.constrained.sqrt.f64(double, metadata, metadata) #[[ATTR]]
14 ; CHECK1: attributes #[[ATTR]] = { inaccessiblememonly nounwind }
14 ; CHECK1: attributes #[[ATTR]] = { inaccessiblememonly nounwind willreturn }
1515 ; Note: FP exceptions aren't usually caught through normal unwind mechanisms,
1616 ; but we may want to revisit this for asynchronous exception handling.
1717 define double @f1(double %a, double %b) {