Commit Graph

182187 Commits

Author SHA1 Message Date
Max Filippov
06ff8708f0 gcc: xtensa: fix PR target/98285
2020-12-14  Max Filippov  <jcmvbkbc@gmail.com>
gcc/
	* config/xtensa/predicates.md (addsubx_operand): Change accepted
	values from 2/4/8 to 1..3.
	* config/xtensa/xtensa.md (*addx, *subx): Change RTL pattern
	to use 'ashift' instead of 'mult'. Update operands[3] value.

gcc/testsuite/
	* gcc.target/xtensa/pr98285.c: New test.
2020-12-14 22:29:50 -08:00
Ian Lance Taylor
773a4106bb go-test.exp: retain any characters at end of ERROR line
* go.test/go-test.exp (errchk): Retain any characters at the end
	of the comment.
2020-12-14 20:39:53 -08:00
liuhongt
e2e0c7b86f Fix up testcase.
gcc/testsuite

	* gcc.target/i386/pr78102.c: Adjust testcase.
2020-12-15 10:06:58 +08:00
GCC Administrator
d52945ce54 Daily bump. 2020-12-15 00:16:35 +00:00
Gerald Pfeifer
22a9021730 rs6000: Update the processor defaults for FreeBSD
gcc/ChangeLog:

2020-12-13  Piotr Kubaj  <pkubaj@FreeBSD.org>
	    Gerald Pfeifer  <gerald@pfeifer.com>

	* config/rs6000/freebsd64.h (PROCESSOR_DEFAULT): Update
	to PROCESSOR_PPC7450.
	(PROCESSOR_DEFAULT64): Update to PROCESSOR_POWER8.
2020-12-15 00:13:42 +01:00
François Dumont
4c275e83dd libstdc++: Make tests with Undefined Behavior in C++11 UNSUPPORTED
libstdc++-v3/ChangeLog:

	* testsuite/23_containers/array/debug/back1_neg.cc: Target c++14 because assertion
	is disabled in C++11.
	* testsuite/23_containers/array/debug/front1_neg.cc: Likewise.
	* testsuite/23_containers/array/debug/square_brackets_operator1_neg.cc: Likewise.
2020-12-14 22:28:38 +01:00
Ilya Leoshkevich
057dc81f82 aix: Fixinclude updates [PR98208]
After 92648faa1c ("aix: Fixinclude") make check-fixincludes began to
fail (at least on gcc121 machine).  Fix by updating fixincludes/tests
and rerunning genfixes.

Co-developed-by: Nathan Sidwell <nathan@acm.org>

fixincludes/ChangeLog:

2020-12-11  Ilya Leoshkevich  <iii@linux.ibm.com>

	* fixincl.x: Rerun genfixes.
	* inclhack.def(aix_physadr_t): Change test_text to something
	that needs to be replaced.
	* tests/base/sys/types.h(aix_physadr_t): Add expectation.
2020-12-14 21:57:32 +01:00
Martin Sebor
fe7f75cf16 Correct/improve maybe_emit_free_warning (PR middle-end/98166, PR c++/57111, PR middle-end/98160).
Resolves:
PR middle-end/98166 - bogus -Wmismatched-dealloc on user-defined allocator and inlining
PR c++/57111 - 57111 - Generalize -Wfree-nonheap-object to delete
PR middle-end/98160 - ICE in default_tree_printer at gcc/tree-diagnostic.c:270

gcc/ChangeLog:

	PR middle-end/98166
	PR c++/57111
	PR middle-end/98160
	* builtins.c (check_access): Call tree_inlined_location
	fndecl_alloc_p): Handle BUILT_IN_ALIGNED_ALLOC and
	BUILT_IN_GOMP_ALLOC.
	call_dealloc_p): Remove unused function.
	(new_delete_mismatch_p): Call valid_new_delete_pair_p and rework.
	(matching_alloc_calls_p): Handle built-in deallocation functions.
	(warn_dealloc_offset): Corrct the handling of user-defined operators
	delete.
	(maybe_emit_free_warning): Avoid assuming expression is a decl.
	Simplify.
	* doc/extend.texi (attribute malloc): Update.
	* tree-ssa-dce.c (valid_new_delete_pair_p): Factor code out into
	valid_new_delete_pair_p in tree.c.
	* tree.c (tree_inlined_location): Define new function.
	(valid_new_delete_pair_p): Define.
	* tree.h (tree_inlined_location): Declare.
	(valid_new_delete_pair_p): Declare.

gcc/c-family/ChangeLog:

	PR middle-end/98166
	PR c++/57111
	PR middle-end/98160
	* c-attribs.c (maybe_add_noinline): New function.
	(handle_malloc_attribute): Call it.  Use ATTR_FLAG_INTERNAL.
	Implicitly add attribute noinline to functions not declared inline
	and warn on those.

libstdc++-v3/ChangeLog:
	* testsuite/ext/vstring/requirements/exception/basic.cc: Suppress
	a false positive warning.
	* testsuite/ext/vstring/requirements/exception/propagation_consistent.cc:
	  Same.

gcc/testsuite/ChangeLog:

	PR middle-end/98166
	PR c++/57111
	PR middle-end/98160
	* g++.dg/warn/Wmismatched-dealloc-2.C: Adjust test of expected warning.
	* g++.dg/warn/Wmismatched-new-delete.C: Same.
	* gcc.dg/Wmismatched-dealloc.c: Same.
	* c-c++-common/Wfree-nonheap-object-2.c: New test.
	* c-c++-common/Wfree-nonheap-object-3.c: New test.
	* c-c++-common/Wfree-nonheap-object.c: New test.
	* c-c++-common/Wmismatched-dealloc.c: New test.
	* g++.dg/warn/Wfree-nonheap-object-3.C: New test.
	* g++.dg/warn/Wfree-nonheap-object-4.C: New test.
	* g++.dg/warn/Wmismatched-dealloc-2.C: New test.
	* g++.dg/warn/Wmismatched-new-delete-2.C: New test.
	* g++.dg/warn/Wmismatched-new-delete.C: New test.
	* gcc.dg/Wmismatched-dealloc-2.c: New test.
	* gcc.dg/Wmismatched-dealloc-3.c: New test.
	* gcc.dg/Wmismatched-dealloc.c: New test.
2020-12-14 13:30:00 -07:00
Sebastian Pop
e63ae8c083 disable --with-{cpu,arch,tune}-32
gcc/
	* config.gcc (aarch64*-*-*): Remove --with-{cpu,arch,tune}-32 flags.
2020-12-14 17:32:23 +00:00
Wilco Dijkstra
4dc486b6ba AArch64: Add support for --with-tune
Add support for --with-tune. Like --with-cpu and --with-arch, the argument is
validated and transformed into a -mtune option to be processed like any other
command-line option.  --with-tune has no effect if a -mcpu or -mtune option
is used. The validating code didn't allow --with-cpu=native, so explicitly
allow that.

Co-authored-by:  Delia Burduv  <delia.burduv@arm.com>

Bootstrap OK, regress pass, OK to commit?

2020-09-03  Wilco Dijkstra  <wdijkstr@arm.com>

gcc/
	* config.gcc (aarch64*-*-*): Add --with-tune. Support --with-cpu=native.
	* config/aarch64/aarch64.h (OPTION_DEFAULT_SPECS): Add --with-tune.

gcc/testsuite/
	* lib/target-supports.exp (check_effective_target_tune_cortex_a76): New
	effective target test.
	* gcc.target/aarch64/with-tune-config.c: New test.
	* gcc.target/aarch64/with-tune-march.c: Likewise.
	* gcc.target/aarch64/with-tune-mcpu.c: Likewise.
	* gcc.target/aarch64/with-tune-mtune.c: Likewise.
2020-12-14 17:31:46 +00:00
Martin Liska
ca086b8b8b gcov: Update comments.
gcc/ChangeLog:

	* gcov.c (output_json_intermediate_file): Update comments.
2020-12-14 17:04:51 +01:00
Piotr Trojanek
a21ec1de4e [Ada] Analyze second parameter of attribute Scaling
gcc/ada/

	* sem_attr.adb (Analyze_Attribute): Resolve second parameter of
	attribute Scaling just like it is resolved for a similar
	attribute Compose.
2020-12-14 10:51:56 -05:00
Piotr Trojanek
7837a887d6 [Ada] Refactor duplicated code for First and Last attributes
gcc/ada/

	* sem_attr.adb (Analyze_Attribute): Merge identical code for
	First/Last, First_Bit/Last_Bit and First_Valid/Last_Valid
	attributes.
2020-12-14 10:51:55 -05:00
Piotr Trojanek
041f8c70ad [Ada] Process Truncation just like other floating point attributes
gcc/ada/

	* sem_attr.adb (Analyze_Attribute): Merge similar code for
	Truncation and other floating point attributes.
2020-12-14 10:51:55 -05:00
Piotr Trojanek
b27e311783 [Ada] Refactor duplicated code for floating point attributes
gcc/ada/

	* sem_attr.adb (Analyze_Attribute): Merge identical code for
	Ceiling, Floor, Fraction, Machine, Machine_Rounding, Model,
	Rounding and Unbiased_Rounding.
2020-12-14 10:51:55 -05:00
Eric Botcazou
951d7d1319 [Ada] Small adjustments to fixed-point I/O units
gcc/ada/

	* libgnat/a-tifiio.adb: Adjust documentation.
	(OK_Get_32): Compare the object size of the base type.
	(OK_Put_32): Likewise.
	(OK_Get_64): Likewise.
	(OK_Put_64): Likewise.
	* libgnat/a-tifiio__128.adb: Adjust documentation.
	(OK_Get_32): Compare the object size of the base type.
	(OK_Put_32): Likewise.
	(OK_Get_64): Likewise.
	(OK_Put_64): Likewise.
	(OK_Get_128): Likewise.
	(OK_Put_128): Likewise.
	* libgnat/a-wtfiio.adb (OK_Get_32): Likewise.
	(OK_Put_32): Likewise.
	(OK_Get_64): Likewise.
	(OK_Put_64): Likewise
	* libgnat/a-wtfiio__128.adb (OK_Get_32): Likewise.
	(OK_Put_32): Likewise.
	(OK_Get_64): Likewise.
	(OK_Put_64): Likewise.
	(OK_Get_128): Likewise.
	(OK_Put_128): Likewise.
	* libgnat/a-ztfiio.adb (OK_Get_32): Likewise.
	(OK_Put_32): Likewise.
	(OK_Get_64): Likewise.
	(OK_Put_64): Likewise
	* libgnat/a-ztfiio__128.adb (OK_Get_32): Likewise.
	(OK_Put_32): Likewise.
	(OK_Get_64): Likewise.
	(OK_Put_64): Likewise.
	(OK_Get_128): Likewise.
	(OK_Put_128): Likewise.
2020-12-14 10:51:55 -05:00
Eric Botcazou
430dd877b8 [Ada] Small cleanup in the Ada.Text_IO hierarchy
gcc/ada/

	* libgnat/a-tifiio.adb (Get): Replace Current_Input with Current_In.
	* libgnat/a-tifiio__128.adb: (Get): Likewise.
	* libgnat/a-wtcoio.adb (Get): Likewise.
	(Put): Replace Current_Output with Current_Out.
	* libgnat/a-wtdeio.adb (Get): Likewise.
	(Put): Likewise.
	* libgnat/a-wtdeio__128.adb (Get): Likewise.
	(Put): Likewise.
	* libgnat/a-wtenio.adb (Get): Likewise.
	(Put): Likewise.
	* libgnat/a-wtfiio.adb (Get): Likewise.
	(Put): Likewise.
	* libgnat/a-wtfiio__128.adb (Get): Likewise.
	(Put): Likewise.
	* libgnat/a-wtflio.adb (Get): Likewise.
	(Put): Likewise.
	* libgnat/a-wtinio.adb (Get): Likewise.
	(Put): Likewise.
	* libgnat/a-wtinio__128.adb (Get): Likewise.
	(Put): Likewise.
	* libgnat/a-wtmoio.adb (Get): Likewise.
	(Put): Likewise.
	* libgnat/a-wtmoio__128.adb (Get): Likewise.
	(Put): Likewise.
	* libgnat/a-ztcoio.adb (Get): Likewise.
	(Put): Likewise.
	* libgnat/a-ztdeio.adb (Get): Likewise.
	(Put): Likewise.
	* libgnat/a-ztdeio__128.adb (Get): Likewise.
	(Put): Likewise.
	* libgnat/a-ztenio.adb (Get): Likewise.
	(Put): Likewise.
	* libgnat/a-ztfiio.adb (Get): Likewise.
	(Put): Likewise.
	* libgnat/a-ztfiio__128.adb (Get): Likewise.
	(Put): Likewise.
	* libgnat/a-ztflio.adb (Get): Likewise.
	(Put): Likewise.
	* libgnat/a-ztinio.adb (Get): Likewise.
	(Put): Likewise.
	* libgnat/a-ztinio__128.adb (Get): Likewise.
	(Put): Likewise.
	* libgnat/a-ztmoio.adb (Get): Likewise.
	(Put): Likewise.
	* libgnat/a-ztmoio__128.adb (Get): Likewise.
	(Put): Likewise.
2020-12-14 10:51:54 -05:00
Justin Squirek
7e7d99bfa2 [Ada] Incorrect accessibility level on type in formal package
gcc/ada/

	* sem_util.adb, sem_util.ads (In_Generic_Formal_Package):
	Created to identify type declarations occurring within generic
	formal packages.
	* sem_res.adb (Resolve_Allocator): Add condition to avoid
	emitting an error for allocators when the type being allocated
	is class-wide and from a generic formal package.
2020-12-14 10:51:54 -05:00
Eric Botcazou
90b2d3fafb [Ada] Fix alignment warning in System.Fat_Gen unit
gcc/ada/

	* libgnat/s-fatgen.adb (Tiny80): Add alignment clause.
2020-12-14 10:51:54 -05:00
Arnaud Charlet
b934866055 [Ada] Add annotation after recent compiler changes
gcc/ada/

	* exp_util.adb (Process_Current_Value_Condition): Add assertion.
	* libgnat/s-fatgen.adb (Scaling): Add annotation.
2020-12-14 10:51:53 -05:00
Arnaud Charlet
415791cf5c [Ada] Fix compile time evaluation of shift intrinsics
gcc/ada/

	* sem_eval.adb (Fold_Shift): Compute values using the base type.
2020-12-14 10:51:53 -05:00
Eric Botcazou
b97b4e6f71 [Ada] Adjust again previous change to System.Fat_Gen
gcc/ada/

	* libgnat/s-fatgen.adb: Add with clause for Interfaces and use
	type clause for Interfaces.Unsigned_64.
	(Small): Comment out.
	(Tiny): Likewise.
	(Tiny16): New integer constant.
	(Tiny32): Likewise.
	(Tiny64): Likewise.
	(Tiny80): New integer array constant.
	(Pred): Declare a local overlay for Tiny.
	(Succ): Likewise.
2020-12-14 10:51:53 -05:00
Eric Botcazou
a36a291399 [Ada] Fix internal error on bit-packed array in Volatile_Full_Access record
gcc/ada/

	* exp_pakd.adb (Expand_Bit_Packed_Element_Set): Fix again packed
	array type in complex cases where array is Volatile.
	* exp_util.adb (Remove_Side_Effects): Do not force a renaming to
	be handled by the back-end.
2020-12-14 10:51:53 -05:00
Eric Botcazou
77c44637af [Ada] Adjust previous change to System.Fat_Gen
gcc/ada/

	* libgnat/s-fatgen.adb: Remove use clause for
	System.Unsigned_Types.
	(Scaling): Add renaming of System.Unsigned_Types and use type
	clause for Long_Long_Unsigned.
2020-12-14 10:51:52 -05:00
Eric Botcazou
f3dd0581a5 [Ada] Implement part of System.Fat_Gen more efficiently
gcc/ada/

	* libgnat/s-fatgen.ads (Compose): Add pragma Inline.
	(Copy_Sign): Likewise.
	(Exponent): Likewise.
	(Fraction): Likewise.
	* libgnat/s-fatgen.adb: Remove with clause for System, add
	with and use clauses for System.Unsigned_Types.
	Add pragma Warnings (Off) for non-static constants.
	Remove precomputed tables of powers of radix and add a few
	constants describing the floating-point format.
	(Gradual_Scaling): Delete.
	(Copy_Sign): Reimplement directly.
	(Decompose): Likewise.
	(Scaling): Likewise.
	(Pred): Speed up.
	(Succ): Likewise.
	(Truncation): Tidy up.
	(Valid): Move constants to library level.
2020-12-14 10:51:52 -05:00
Piotr Trojanek
3cde9f1cc5 [Ada] Remove double initialization of the known value cache
gcc/ada/

	* sem_eval.adb (CV_Cache): Remove initialization at elaboration.
2020-12-14 10:51:52 -05:00
Gary Dismukes
a98c6ffa0b [Ada] Fix documentation of -gnatw.K switch (activates => disables)
gcc/ada/

	* doc/gnat_ugn/building_executable_programs_with_gnat.rst:
	Correct documentation of the -gnatw.K switch to say that it
	disables rather than activates the warning.
	* gnat_ugn.texi: Regenerate.
2020-12-14 10:51:52 -05:00
Doug Rupp
e5e963ab2e [Ada] armhf-linux: symbolic tracebacks
gcc/ada/

	* tracebak.c: Add a section for ARM Linux.
2020-12-14 10:51:51 -05:00
Ghjuvan Lacambre
9189557557 [Ada] Implement AI12-0398-1/03
gcc/ada/

	* par-ch3.adb (P_Discriminant_Part_Opt): Parse aspects, update
	documentation.
	* par-ch6.adb (P_Return_Statement): Likewise.
	* par-ch9.adb (P_Entry_Index_Specification): Likewise.
2020-12-14 10:51:51 -05:00
Gary Dismukes
097826df0c [Ada] Additional fixes for Default_Initial_Condition
gcc/ada/

	* exp_aggr.adb (Build_Array_Aggr_Code.Gen_Assign): Move
	generation of the call for DIC check past the optional
	generation of calls to controlled Initialize procedures.
	* exp_ch3.adb
	(Build_Array_Init_Proc.Init_One_Dimension.Possible_DIC_Call):
	Suppress generation of a DIC call when the array component type
	is controlled.  The call will now be generated later inside the
	array's DI (Deep_Initialize) procedure.
	* exp_ch7.adb
	(Make_Deep_Array_Body.Build_Initialize_Statements): Generate a
	DIC call (when needed by the array component type) after any
	call to the component type's controlled Initialize procedure, or
	generate the DIC call by itself if there's no Initialize to
	call.
	* sem_aggr.adb (Resolve_Record_Aggregate.Add_Association):
	Simplify condition to only test Is_Box_Init_By_Default (previous
	condition was overkill, as well as incorrect in some cases).
	* sem_elab.adb (Active_Scenarios.Output_Call): For
	Default_Initial_Condition, suppress call to
	Output_Verification_Call when the subprogram is a partial DIC
	procedure.
2020-12-14 10:51:51 -05:00
Eric Botcazou
3254363745 [Ada] Fix couple of bugs in the implementation of Round attribute
gcc/ada/

	* exp_attr.adb (Expand_N_Attribute_Reference) <Attribute_Round>:
	Adjust commentary and set the Rounded_Result flag on the type
	conversion node when the node is needed.
	* exp_ch4.adb (Expand_N_Type_Conversion): Minor tweak.
	(Fixup_Universal_Fixed_Operation): Look through the type conversion
	only when it is to Universal_Real.
	* exp_fixd.adb: Remove with and use clauses for Snames.
	(Build_Divide): Remove redundant test.
	(Expand_Convert_Float_To_Fixed): Use Rounded_Result flag on the
	node to set the truncation parameter.
2020-12-14 10:51:50 -05:00
Piotr Trojanek
c2dc9fb661 [Ada] Simplify prevention of cascaded errors for Refined_State
gcc/ada/

	* sem_prag.adb (Analyze_Refinement_Clause): Simplify recently
	added code for preventing cascaded errors.
2020-12-14 10:51:50 -05:00
Bob Duff
2c40c60ecb [Ada] Compiler crash on call to function instance
gcc/ada/

	* exp_ch6.adb (Is_Build_In_Place_Result_Type): Further narrow
	the conditions under which we enable build-in-place for
	controlled types.
2020-12-14 10:51:50 -05:00
Yannick Moy
d983a9d050 [Ada] Fix warning control character for message on IN OUT parameter
gcc/ada/

	* sem_warn.adb (Output_Non_Modified_In_Out_Warnings): Use right
	warning control character 'k' in both comment and call to
	Errout_Msg_N.
2020-12-14 10:51:50 -05:00
Yannick Moy
758daef51b [Ada] Refine error messages on illegal Refined_State in SPARK
gcc/ada/

	* sem_prag.adb (Analyze_Refined_State_In_Decl_Part): Refine the
	error message for missing Part_Of on constituent. Avoid
	cascading error.
2020-12-14 10:51:49 -05:00
Piotr Trojanek
2a1a3fc67f [Ada] Avoid reanalysis of malformed dependency relations
gcc/ada/

	* sem_prag.adb (Analyze_Depends_In_Decl_Part): Replace early
	returns with goto Leave.
	(Collect_Subprogram_Inputs_Outputs): Fix style in comment.
2020-12-14 10:51:49 -05:00
Eric Botcazou
d494f9f037 [Ada] Tidy up implementation of System.Fat_Gen.Valid and inline it again
gcc/ada/

	* libgnat/s-fatgen.ads (Valid): Add again pragma Inline.
	* libgnat/s-fatgen.adb (Valid): Improve commentary, tidy up left
	and right, and remove superfluous trick for denormalized numbers.
2020-12-14 10:51:49 -05:00
Piotr Trojanek
efec136240 [Ada] Fix analysis of access objects in Depends contracts
gcc/ada/

	* sem_prag.adb (Find_Role): Constant object of
	access-to-constant and access-to-subprogram types are not
	writable.
	(Collect_Subprogram_Inputs_Outputs): In-parameters of
	access-to-variable type can act as outputs of the Depends
	contracts.
2020-12-14 10:51:49 -05:00
Piotr Trojanek
ae8c56262d [Ada] Update comment for processing of pragma Assertion_Policy
gcc/ada/

	* sa_messages.ads: Reference Subprogram_Variant in the comment
	for Assertion_Check.
	* sem_prag.adb (Analyze_Pragma): Add Subprogram_Variant as an
	ID_ASSERTION_KIND; move Default_Initial_Condition as an
	RM_ASSERTION_KIND.
2020-12-14 10:51:48 -05:00
Yannick Moy
3fcb8100aa [Ada] Correctly mark subprogram as not always inlined in GNATprove mode
gcc/ada/

	* inline.adb (Cannot_Inline): Add No_Info parameter to disable
	info message.
	* inline.ads (Cannot_Inline): When No_Info is set to True, do
	not issue info message in GNATprove mode, but still mark the
	subprogram as not always inlined.
	* sem_res.adb (Resolve_Call): Always call Cannot_Inline inside
	an assertion expression.
2020-12-14 10:51:48 -05:00
Eric Botcazou
49ea96b4d8 [Ada] Adjust documentation of System.Img_Util.Set_Decimal_Digits
gcc/ada/

	* libgnat/s-imguti.ads (Set_Decimal_Digits): Adjust documentation.
2020-12-14 10:51:48 -05:00
Nathan Sidwell
62c5ea5228 preprocessor: Deferred macro support
For deferred macros we also need a new field on the macro itself, so
that the module machinery can determine the macro was imported.  Also
the documentation for the hashnode's deferred field was incomplete.

	libcpp/
	* include/cpplib.h (struct cpp_macro): Add imported_p field.
	(struct cpp_hashnode): Tweak deferred field documentation.
	* macro.c (_cpp_new_macro): Clear new field.
	(cpp_get_deferred_macro, get_deferred_or_lazy_macro): Assert
	more.
2020-12-14 07:23:59 -08:00
Tamar Christina
159b0bd9ce middle-end: Exclude TOP permute from blend considerations
Similarly to UNKNOWN permutes, TOP needs to be excluded from being considered
for blends because it produces no permute to check.

gcc/ChangeLog:

	PR middle-end/98264
	* tree-vect-slp-patterns.c (linear_loads_p): Exclude TOP permute.

gcc/testsuite/ChangeLog:

	PR middle-end/98264
	* gcc.target/i386/pr98264.c: New test.
2020-12-14 15:20:11 +00:00
Ilya Leoshkevich
470a25b638 Limit perf data buffer during feature checking
Commit 2ead1ab911 ("Limit perf data buffer during profiling") added
-m8 to perf invocations during running tests, but the same problem
exists for checking whether perf is working in the first place.

gcc/testsuite/ChangeLog:

2020-12-08  Ilya Leoshkevich  <iii@linux.ibm.com>

	* lib/target-supports.exp(check_profiling_available): Limit
	perf data buffer.
2020-12-14 12:59:04 +01:00
Andrea Corallo
f60c1b3102 .dir-locals.el: Set 'fill-column' to 80 for c-mode
ChangeLog

2020-12-11  Andrea Corallo  <andrea.corallo@arm.com>

	* .dir-locals.el (c-mode): Set 'fill-column' to 80 columns.
2020-12-14 12:19:56 +01:00
Christophe Lyon
4cbb7cab47 arm: Auto-vectorization for MVE: vneg
This patch enables MVE vneg instructions for auto-vectorization.  MVE
vnegq insns in mve.md are modified to use 'neg' instead of unspec
expression.  The neg<mode>2 expander is added to vec-common.md.

Existing patterns in neon.md are prefixed with neon_.
It's not clear why we have different patterns for VDQW
and VH in neon.md, when WDQWH handles both, and patterns
with VDQ have provision for attributes for FP modes.

Another question is why <absneg_str><mode>2 always sets
neon_abs<q> type when it also handles neon_neq<q> cases.

2020-12-11  Christophe Lyon  <christophe.lyon@linaro.org>

	gcc/
	* config/arm/mve.md (mve_vnegq_f): Use 'neg' instead of unspec.
	(mve_vnegq_s): Likewise.
	* config/arm/neon.md (neg<mode>2): Rename into neon_neg<mode>2.
	(<absneg_str><mode>2): Rename into neon_<absneg_str><mode>2.
	(neon_v<absneg_str><mode>): Call gen_neon_<absneg_str><mode>2.
	(vashr<mode>3): Call gen_neon_neg<mode>2.
	(vlshr<mode>3): Call gen_neon_neg<mode>2.
	(neon_vneg<mode>): Call gen_neon_neg<mode>2.
	* config/arm/unspecs.md (VNEGQ_F, VNEGQ_S): Remove.
	* config/arm/vec-common.md (neg<mode>2): New expander.

	gcc/testsuite/
	* gcc.target/arm/simd/mve-vneg.c: Add tests for vneg.
2020-12-14 10:47:29 +00:00
Christophe Lyon
fd43603414 arm: Auto-vectorization for MVE: vmvn
This patch enables MVE vmvnq instructions for auto-vectorization.  MVE
vmvnq insns in mve.md are modified to use 'not' instead of unspec
expression to support one_cmpl<mode>2.  The one_cmpl<mode>2 expander
is added to vec-common.md.

2020-12-11  Christophe Lyon  <christophe.lyon@linaro.org>

	gcc/
	* config/arm/iterators.md (VDQNOTM2): New mode iterator.
	(supf): Remove VMVNQ_S and VMVNQ_U.
	(VMVNQ): Remove.
	* config/arm/mve.md (mve_vmvnq_u<mode>): New entry for vmvn
	instruction using expression not.
	(mve_vmvnq_s<mode>): New expander.
	* config/arm/neon.md (one_cmpl<mode>2): Renamed into
	one_cmpl<mode>2_neon.
	* config/arm/unspecs.md (VMVNQ_S, VMVNQ_U): Remove.
	* config/arm/vec-common.md (one_cmpl<mode>2): New expander.

	gcc/testsuite/
	* gcc.target/arm/simd/mve-vmvn.c: Add tests for vmvn.
2020-12-14 10:47:29 +00:00
Christophe Lyon
5391cf07be arm: Auto-vectorization for MVE: vbic
This patch enables MVE vbic instructions for auto-vectorization.  MVE
vbicq insns in mve.md are modified to use 'and not' instead of unspec
expression.

2020-12-11  Christophe Lyon  <christophe.lyon@linaro.org>

	gcc/
	* config/arm/iterators.md (supf): Remove VBICQ_S and VBICQ_U.
	(VBICQ): Remove.
	* config/arm/mve.md (mve_vbicq_u<mode>): New entry for vbic
	instruction using expression and not.
	(mve_vbicq_s<mode>): New expander.
	(mve_vbicq_f<mode>): Replace use of unspec by 'and not'.
	* config/arm/unspecs.md (VBICQ_S, VBICQ_U, VBICQ_F): Remove.

	gcc/testsuite/
	* gcc.target/arm/simd/mve-vbic.c: Add tests for vbic.
2020-12-14 10:47:29 +00:00
Christophe Lyon
434fb3b6cc arm: Auto-vectorization for MVE: veor
This patch enables MVE veorq instructions for auto-vectorization.  MVE
veorq insns in mve.md are modified to use xor instead of unspec
expression to support xor<mode>3.  The xor<mode>3 expander is added to
vec-common.md

2020-12-11  Christophe Lyon  <christophe.lyon@linaro.org>

	gcc/
	* config/arm/iterators.md (supf): Remove VEORQ_S and VEORQ_U.
	(VEORQ): Remove.
	* config/arm/mve.md (mve_veorq_u<mode>): New entry for veor
	instruction using expression xor.
	(mve_veorq_s<mode>): New expander.
	(mve_veorq_f<mode>): Use 'xor' code instead of unspec.
	* config/arm/neon.md (xor<mode>3): Renamed into xor<mode>3_neon.
	* config/arm/unspecs.md (VEORQ_S, VEORQ_U, VEORQ_F): Remove.
	* config/arm/vec-common.md (xor<mode>3): New expander.

	gcc/testsuite/
	* gcc.target/arm/simd/mve-veor.c: Add tests for veor.
2020-12-14 10:47:29 +00:00
Christophe Lyon
ebc15a4e1e arm,testsuite: Fix vect-half-floats.c test
This patch fixes typos in effective targets which otherwise lead to
DejaGnu errors.

It also replaces dg-additional-options with dg-options to avoid
compiling with -ansi -pedantic-errors, resulting in
error: ISO C does not support the '_Float16' type [-Wpedantic]

2020-12-14  Christophe Lyon  <christophe.lyon@linaro.org>

	gcc/testsuite/
	* gcc.target/arm/vect-half-floats.c: Fix typos.
2020-12-14 10:46:57 +00:00