Philip Herron [Tue, 27 Sep 2022 11:19:43 +0000 (12:19 +0100)]
gccrs: Fix duplicated function generation on higher ranked trait bounds
Deuplicate function elimination can fail when we compile helpers during
higher ranked trait bound monomorphization. This because the
TyTy::BaseType info can be lost/reset during the compilation process. This
adds a second mechanism to match based on the manged names which is a bit
more reliable. This patch is required since the query based refactor of
the type system so this issue was likely hidden to to using duplicated type
info for higher ranked trait bounds.
gcc/rust/ChangeLog:
* backend/rust-compile-context.h: Add new optional `asm_name` string
argument to `lookup_function_decl`.
* backend/rust-compile-item.cc (CompileItem::visit): Compute assembly
name and pass it to `lookup_function_decl` when calling it.
Arthur Cohen [Wed, 31 Aug 2022 11:53:28 +0000 (13:53 +0200)]
gccrs: rust: Add -frust-compile-until option
This option helps ensure that we do not introduce regressions on various
parts of the compilation pipeline. For example, a testcase (or testsuite
from the `testing` project) might pass attribute checking, expansion and
lowering, but fail during typechecking. Should a change suddenly make
that testcase fail expansion, we would not be able to notice it. By
generating tests that run up until expansion, typechecking, compilation
and so forth we ensure that no regressions are added accidentally to
already failing tests/testsuites.
gcc/rust/ChangeLog:
* lang.opt: Add new ``-frust-compile-until` option.
* rust-session-manager.cc (Session::compile_crate): Add stops around
various compilation steps in the pipeline.
* rust-session-manager.h (struct CompileOptions): Add `CompileStep` enum
and field.
Philip Herron [Sat, 17 Sep 2022 09:04:49 +0000 (10:04 +0100)]
gccrs: Static Items must be const evaluated
Statics like constants need to have a singular value they are not functions
to be lazy evaluated. So to evaluate a block expr we can just reuse our
const code to resolve this to a singular value.
Arthur Cohen [Wed, 14 Sep 2022 08:23:46 +0000 (10:23 +0200)]
gccrs: module lowering: Do not append null pointers as items
Some module items do not need to get lowered to HIR such as `macro_rules!` definitions. Hence, module lowering should act the same as crate lowering: Only emplace back the lowered item if it is a valid pointer
gcc/rust/ChangeLog:
* hir/rust-ast-lower-item.cc (ASTLoweringItem::visit): Do not lower
null items within modules.
Arthur Cohen [Mon, 12 Sep 2022 14:26:46 +0000 (16:26 +0200)]
gccrs: const generics: Forbid default values in Functions, Traits and Impls
gcc/rust/ChangeLog:
* checks/errors/rust-const-checker.cc (ConstChecker::ctx_to_str): Allow
getting an error string from a specific constant context.
(ConstChecker::ctx_allows_default): New function, check if a context
allows default values for Const generics.
(ConstChecker::visit): Call into `ctx_allows_default`.
* checks/errors/rust-const-checker.h: Declare `ctx_allows_default`.
gccrs: backend: correctly formulate the exit condition ...
... previously the exit condition was treated the same as the loop
condition (which is the inverse condition of the exit condition). Now
this is corrected.
gcc/rust/ChangeLog:
* backend/rust-compile-expr.cc (CompileExpr::visit): Properly formulate
exit condition when compiling while loops.
Philip Herron [Wed, 31 Aug 2022 16:07:51 +0000 (17:07 +0100)]
gccrs: Add new check for contains_associated_types
We don't need to setup associated types when a trait does not contain any
associated types.
gcc/rust/ChangeLog:
* typecheck/rust-tyty-bounds.cc (TypeBoundPredicate::contains_associated_types):
Check if a type bound predicate contains assocated types.
* typecheck/rust-tyty.h: Declare the above mentioned function.
* typecheck/rust-hir-trait-resolve.cc: Use `contains_associated_types`
function.
Philip Herron [Thu, 25 Aug 2022 13:46:32 +0000 (14:46 +0100)]
gccrs: Create canonical process of compiling constant items
In order to compile a block expression constant, the simplest way for us
was to reuse what code we have and to generate an artifical function which
does not get added to the translation unit. The constant then becomes
a CALL_EXPR to this artifical function which we can pass to the constexpr
evaluator to resolve the result of this artifical 'CALL_EXPR'.
Before this patch we seperated the difference between block expressions
and non block expressions in constants. So for non block expressions we
simply compiled them as if it was a simple constant but this is not
guaranteed to be the case in rust, for example coercion sites can generate
temporaries during autoderef which we let the constant evaluator resolve
for us. This makes all constants handled in the same way to simplify the
logic here.
gcc/rust/ChangeLog:
* backend/rust-compile-base.cc: Improve compilation pipeline and simplify
function.
Philip Herron [Wed, 31 Aug 2022 13:08:43 +0000 (14:08 +0100)]
gccrs: Remove param_use_canonical_types checks ported from c++ front-end
We are not fully setting TYPE_CANONICAL yet but we don't need to be as
strict as the C++ front-end yet. param_use_canonical_types is a command
line option we are not using either.
gcc/rust/ChangeLog:
* backend/rust-tree.cc (comptypes): Remove some C++ specific checks in
Rust const folder for now.
Philip Herron [Fri, 26 Aug 2022 14:09:55 +0000 (15:09 +0100)]
gccrs: Refactor unify to hit a unify_site
This allows us to enforce better error handling on unify sites
gcc/rust/ChangeLog:
* typecheck/rust-hir-type-check-base.cc (TypeCheckBase::unify_site): Add
better unification function with debug calls.
* typecheck/rust-autoderef.cc (AutoderefCycle::cycle): Add more debug
calls and use new unify API.
* typecheck/rust-coercion.cc (TypeCoercionRules::do_coercion): Likewise.
(TypeCoercionRules::coerce_borrowed_pointer): Likewise.
(TypeCoercionRules::select): Likewise.
* typecheck/rust-hir-dot-operator.cc (MethodResolver::select): Likewise.
* typecheck/rust-hir-trait-resolve.cc (TraitItemReference::resolve_item): Likewise.
(TypeCheckBase::coercion_site): Likewise.
(TypeCheckBase::cast_site): Likewise.
* typecheck/rust-hir-type-check-base.h: Likewise.
* typecheck/rust-hir-type-check-enumitem.cc (TypeCheckEnumItem::visit): Likewise.
* typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): Likewise.
* typecheck/rust-hir-type-check-implitem.cc (TypeCheckTopLevelImplItem::visit): Likewise.
(TypeCheckImplItem::visit): Likewise.
* typecheck/rust-hir-type-check-item.cc (TypeCheckItem::visit): Likewise.
* typecheck/rust-hir-type-check-path.cc (TypeCheckExpr::resolve_segments): Likewise.
* typecheck/rust-hir-type-check-pattern.cc (TypeCheckPattern::visit): Likewise.
* typecheck/rust-hir-type-check-stmt.cc (TypeCheckStmt::visit): Likewise.
* typecheck/rust-hir-type-check-struct.cc (TypeCheckStructExpr::resolve): Likewise.
* typecheck/rust-hir-type-check-toplevel.cc (TypeCheckTopLevel::visit): Likewise.
* typecheck/rust-hir-type-check-type.cc (TypeCheckType::visit): Likewise.
* typecheck/rust-hir-type-check.cc (TypeResolution::Resolve): Likewise.
* typecheck/rust-tyctx.cc (TypeCheckContext::peek_return_type): Likewise.
* typecheck/rust-tyty-call.cc (TypeCheckMethodCallExpr::visit): Likewise.
* typecheck/rust-tyty-cmp.h: Likewise.
* typecheck/rust-tyty-rules.h: Likewise.
* typecheck/rust-tyty.cc (BaseType::mappings_str): Likewise.
(BaseType::debug): Print type name more clearly.
(BaseType::debug_str): Add new function to print type pointer and name.
(TupleType::get_name): Improve type name fetching function.
(ReferenceType::get_name): Likewise.
(PointerType::get_name): Likewise.
* typecheck/rust-tyty.h: Refactor definitions outside of the header.
gcc/testsuite/ChangeLog:
* rust/compile/issue-1152.rs: Fix dejagnu assertion.
* rust/compile/tuple1.rs: Likewise.
* rust/compile/type-alias1.rs: Likewise.
* rust/execute/torture/operator_overload_9.rs: Likewise.
* rust/execute/torture/slice1.rs: Rework test to use new parsing
capability and stick to the original implementation.
Arthur Cohen [Mon, 29 Aug 2022 11:37:13 +0000 (13:37 +0200)]
gccrs: ast: Only expand expressions and types if the kind is right
gcc/rust/ChangeLog:
* ast/rust-ast.h: Add assertions and accessors for fragment nodes.
* expand/rust-attribute-visitor.cc (AttrVisitor::visit): Fix expansion
context typo when visiting `InherentImpl` items.
(AttrVisitor::maybe_expand_expr): Use new Fragment accessor to fetch
properly typed node.
(AttrVisitor::maybe_expand_type): Likewise.
* expand/rust-macro-expand.cc (transcribe_type): Emit parse errors
when trying to parse a type.
Arthur Cohen [Mon, 29 Aug 2022 10:51:33 +0000 (12:51 +0200)]
gccrs: macros: Handle matchers properly in repetitions
gcc/rust/ChangeLog:
* expand/rust-macro-expand.cc (MacroExpander::match_matcher): Handle
fragments differently based on whether or not we are currently trying
to match a matcher in a repetition context.
(MacroExpander::match_n_matches): Use new `in_repetition` argument
properly when calling `match_matcher`.
* expand/rust-macro-expand.h (MacroExpander::match_matcher): Allow
passing extra `in_repetition` bool argument
Arthur Cohen [Fri, 26 Aug 2022 06:44:02 +0000 (08:44 +0200)]
gccrs: backend: Add overflow checks to every arithmetic operation
gcc/rust/ChangeLog:
* backend/rust-compile-expr.cc (CompileExpr::visit): Insert overflow
checks logic.
(CompileExpr::array_copied_expr): Insert overflow checks logic.
* backend/rust-compile-item.cc (CompileItem::visit): Insert overflow
checks logic.
* backend/rust-compile-type.cc (TyTyResolveCompile::visit): Insert
overflow checks logic.
* rust-gcc.cc (Gcc_backend::arithmetic_or_logical_expression): Differentiate
existing function from `arithmetic_or_logical_expression_checked`.
This function does insert perform overflow checks.
(Gcc_backend::arithmetic_or_logical_expression_checked): New
function.
(is_overflowing_expr): New function. Check if an expression is an
overflowing one (ADD, SUB, MUL).
(fetch_overflow_builtins): New function.
* rust-backend.h: Declare `arithmetic_or_logical_expression_checked` in
abstract `Backend` class.
gcc/testsuite/ChangeLog:
* rust/debug/win64-abi.rs: Fix assertion to take into account
overflow builtins
* rust/compile/torture/macro-issue1426.rs: Moved to...
* rust/execute/torture/macro-issue1426.rs: ...here.
* rust/execute/torture/overflow1.rs: New test.
Philip Herron [Thu, 25 Aug 2022 14:33:02 +0000 (15:33 +0100)]
gccrs: Desugar double borrows into two HIR:BorrowExpr's
We simply hit a gcc_unreachable() on double borrows but it seems reasonable
to just desugar the AST into a borrow of a borrow to foo. Instead of a
borrow expression with a flag to be respected.
Fixes #1506
gcc/rust/ChangeLog:
* hir/rust-ast-lower-expr.h: Lower double borrow expressions to two
`HIR::BorrowExpr`s.
* hir/tree/rust-hir-expr.h: Remove `is_double_borrow` field from
`HIR::BorrowExpr`.
* typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): Remove
call to `gcc_unreachable` on double borrow expressions.
Faisal Abbas [Mon, 27 Jun 2022 15:05:49 +0000 (16:05 +0100)]
gccrs: const folding port
This changeset ports cp_global_trees structure which is used throughout the
cp constexpr.cc code. I am not sure what it's purpose is but it seems it is used
to add and manipulate tree information during the c++ compilation process.
It is possible this is not needed in the Rust code and may be taken out later.
Also, the initialization function isn't being called from anywhere yet, so
we will need to find a suitable point for it.
* rust-session-manager.cc (Session::compile_crate): Allow the dump of prettified AST
(Session::dump_ast_pretty): New
* rust-session-manager.h: Add new output file for pretty AST dump
Jakub Jelinek [Tue, 31 Jan 2023 09:12:19 +0000 (10:12 +0100)]
i386: Fix up ix86_convert_const_wide_int_to_broadcast [PR108599]
The following testcase is miscompiled. The problem is that during
RTL DSE we see a V4DI register is being loaded { 16, 16, 0, 0 }
value and DSE mostly works in terms of scalar modes, so it calls
movoi to set an OImode REG to (const_wide_int 0x100000000000000010)
and ix86_convert_const_wide_int_to_broadcast thinks it can compute
that value by broadcasting DImode 0x10. While it is true that
for TImode result the broadcast could be used, for OImode/XImode
it can't be, because all but the lowest 2 HOST_WIDE_INTs aren't
present (so are 0 or -1 depending on sign), not 0x10 in this case.
The function checks if the least significant HOST_WIDE_INT elt
of the CONST_WIDE_INT is broadcastable from QI/HI/SI/DImode and then
/* Check if OP can be broadcasted from VAL. */
for (int i = 1; i < CONST_WIDE_INT_NUNITS (op); i++)
if (val != CONST_WIDE_INT_ELT (op, i))
return nullptr;
That is needed of course, but nothing checks that
CONST_WIDE_INT_NUNITS (op) isn't too small for the mode in question.
I think if op would be 0 or -1, it ought to be never CONST_WIDE_INT,
but CONST_INT and so we can just punt whenever the number of
CONST_WIDE_INT elts is not the expected one.
2023-01-31 Jakub Jelinek <jakub@redhat.com>
PR target/108599
* config/i386/i386-expand.cc
(ix86_convert_const_wide_int_to_broadcast): Return nullptr if
CONST_WIDE_INT_NUNITS (op) times HOST_BITS_PER_WIDE_INT isn't
equal to bitsize of mode.
Xianmiao Qu [Tue, 31 Jan 2023 08:49:06 +0000 (09:49 +0100)]
testsuite/108604 - gcc.dg/torture/pr108574-3.c hangs on unsigned char archs
In the architecture where sign defaults to unsigned, the 'f' will be zero
extended to int type in the expression 'd = ~(f & ~2880764155)', then the
'd' will become -1 wich cause the case to fail.
So it's ok for the architectures where sign defaults to signed like x86,
but failed for the architectures where sign defaults to unsigned like arm
and csky. Change char to signed char to avoid this problem.
PR testsuite/108604
gcc/testsuite:
* gcc.dg/torture/pr108574-3.c (b, f): Change type from char to
signed char.
Jakub Jelinek [Tue, 31 Jan 2023 08:46:35 +0000 (09:46 +0100)]
bbpart: Fix up ICE on asm goto [PR108596]
On the following testcase we have asm goto in hot block with 2 successors,
one cold to which it both falls through and has one of the label
pointing to it and another hot successor with another label.
Now, during bbpart we want to ensure that no blocks from one partition fall
through into a block in a different partition. fix_up_fall_thru_edges
does that by temporarily clearing the EDGE_CROSSING on the fallthrough edge,
calling force_nonfallthru and then depending on whether it created a new
bb either set EDGE_CROSSING on the single successor edge from the new bb
(the new bb is kept in the same partition as the predecessor block), or
if no new bb has been created setting EDGE_CROSSING back on the fallthru
edge which has been forced non-EDGE_FALLTHRU.
For asm goto this doesn't always work, force_nonfallthru can create a new bb
and change the fallthrough edge to point to that, but if the original
fallthru destination block has its label referenced among the asm goto
labels, it will create a new non-fallthru edge for the label(s).
But because we've temporarily cheated and cleared EDGE_CROSSING on the edge,
it is cleared on the new edge as well, then the caller sees we've created
a new bb and just sets EDGE_CROSSING on the single fallthru edge from the
new bb. But the direct edge from cur_bb to fallthru edge's destination
isn't handled and fails afterwards consistency checks, because it crosses
partitions.
The following patch notes the case and sets EDGE_CROSSING on that edge too.
2023-01-31 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/108596
* bb-reorder.cc (fix_up_fall_thru_edges): Handle the case where cur_bb
ends with asm goto and has a crossing fallthrough edge to the same bb
that contains at least one of its labels by restoring EDGE_CROSSING
flag even on possible edge from cur_bb to new_bb successor.
Jakub Jelinek [Tue, 31 Jan 2023 08:20:34 +0000 (09:20 +0100)]
i386: Fix up -Wuninitialized warnings in avx512erintrin.h [PR105593]
As reported in the PR, there are some -Wuninitialized warnings in
avx512erintrin.h. One can see that by compiling sse-23.c testcase with
-Wuninitialized (or when actually using those intrinsics).
Those 6 spots use an uninitialized variable and pass it as one of the
argument to a builtin with constant mask -1, because there is no unmasked
builtin. It is true that expansion of those builtins into RTL will see
mask is all ones and ignore the unneeded argument, but -Wuninitialized
is diagnosed on GIMPLE and on GIMPLE these builtins are just builtin calls.
avx512fintrin.h and other headers use in these cases the _mm*_undefined_* ()
intrinsics, like:
return (__m512i) __builtin_ia32_psrav8di_mask ((__v8di) __X,
(__v8di) __Y,
(__v8di)
_mm512_undefined_epi32 (),
(__mmask8) -1);
etc. and the following patch does the same for avx512erintrin.h.
With the recent changes in C++ FE and the _mm*_undefined_* intrinsics,
we don't emit -Wuninitialized warnings for those (previously we didn't
just in C due to self-initialization). Of course we could also
just self-initialize these uninitialized vars and add the #pragma GCC
diagnostic dances around it, but using the intrinsics is consistent with
the rest and IMHO cleaner.
2023-01-31 Jakub Jelinek <jakub@redhat.com>
PR c++/105593
* config/i386/avx512erintrin.h (_mm512_exp2a23_round_pd,
_mm512_exp2a23_round_ps, _mm512_rcp28_round_pd, _mm512_rcp28_round_ps,
_mm512_rsqrt28_round_pd, _mm512_rsqrt28_round_ps): Use
_mm512_undefined_pd () or _mm512_undefined_ps () instead of using
uninitialized automatic variable __W.
* gcc.target/i386/sse-23.c: Add -Wuninitialized to dg-options.
Kito Cheng [Tue, 31 Jan 2023 03:48:51 +0000 (11:48 +0800)]
RISC-V: Simplify testcase condition for RVV tests [NFC]
We got some trouble on some platform, it show get twice for the asm, but
it only show once, seems like our pattern might be too complicated, so
simplify that make every platform happey with those testcase.
YunQiang Su [Fri, 6 Jan 2023 10:28:22 +0000 (18:28 +0800)]
libsanitizer/mips: always build with largefile support
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 is always used for mips
when build libsanitizer in LLVM. Thus
FIRST_32_SECOND_64((_MIPS_SIM == _ABIN32) ? 176 : 160, 216);
instead of
FIRST_32_SECOND_64((_MIPS_SIM == _ABIN32) ? 160 : 144, 216);
in sanitizer_platform_limits_posix.h.
To keep sync with LLVM and to make the code simple, we use the
largefile options always.
libsanitizer/
* configure.ac: set -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
always for mips*.
* configure: Regenerate.
Gerald Pfeifer [Mon, 30 Jan 2023 22:12:23 +0000 (23:12 +0100)]
libstdc++: Update links in the Memory section of the manual
libstdc++-v3/ChangeLog:
* doc/xml/manual/shared_ptr.xml: Move links from both
http://open-std.org and http://www.open-std.org to
https://www.open-std.org.
* doc/html/manual/memory.html: Regenerate.
Ju-Zhe Zhong [Sun, 29 Jan 2023 23:40:50 +0000 (07:40 +0800)]
RISC-V: Add vloxei64 C++ API intrinsic testcase
gcc/testsuite/ChangeLog:
* g++.target/riscv/rvv/base/vloxei64-1.C: New test.
* g++.target/riscv/rvv/base/vloxei64-2.C: New test.
* g++.target/riscv/rvv/base/vloxei64-3.C: New test.
* g++.target/riscv/rvv/base/vloxei64_mu-1.C: New test.
* g++.target/riscv/rvv/base/vloxei64_mu-2.C: New test.
* g++.target/riscv/rvv/base/vloxei64_mu-3.C: New test.
* g++.target/riscv/rvv/base/vloxei64_tu-1.C: New test.
* g++.target/riscv/rvv/base/vloxei64_tu-2.C: New test.
* g++.target/riscv/rvv/base/vloxei64_tu-3.C: New test.
* g++.target/riscv/rvv/base/vloxei64_tum-1.C: New test.
* g++.target/riscv/rvv/base/vloxei64_tum-2.C: New test.
* g++.target/riscv/rvv/base/vloxei64_tum-3.C: New test.
* g++.target/riscv/rvv/base/vloxei64_tumu-1.C: New test.
* g++.target/riscv/rvv/base/vloxei64_tumu-2.C: New test.
* g++.target/riscv/rvv/base/vloxei64_tumu-3.C: New test.
Ju-Zhe Zhong [Sun, 29 Jan 2023 23:39:29 +0000 (07:39 +0800)]
RISC-V: Add vloxei32 C++ API intrinsic testcases
gcc/testsuite/ChangeLog:
* g++.target/riscv/rvv/base/vloxei32-1.C: New test.
* g++.target/riscv/rvv/base/vloxei32-2.C: New test.
* g++.target/riscv/rvv/base/vloxei32-3.C: New test.
* g++.target/riscv/rvv/base/vloxei32_mu-1.C: New test.
* g++.target/riscv/rvv/base/vloxei32_mu-2.C: New test.
* g++.target/riscv/rvv/base/vloxei32_mu-3.C: New test.
* g++.target/riscv/rvv/base/vloxei32_tu-1.C: New test.
* g++.target/riscv/rvv/base/vloxei32_tu-2.C: New test.
* g++.target/riscv/rvv/base/vloxei32_tu-3.C: New test.
* g++.target/riscv/rvv/base/vloxei32_tum-1.C: New test.
* g++.target/riscv/rvv/base/vloxei32_tum-2.C: New test.
* g++.target/riscv/rvv/base/vloxei32_tum-3.C: New test.
* g++.target/riscv/rvv/base/vloxei32_tumu-1.C: New test.
* g++.target/riscv/rvv/base/vloxei32_tumu-2.C: New test.
* g++.target/riscv/rvv/base/vloxei32_tumu-3.C: New test.
Ju-Zhe Zhong [Sun, 29 Jan 2023 23:37:39 +0000 (07:37 +0800)]
RISC-V: Add vloxei16 C++ API intrinsic testcases
gcc/testsuite/ChangeLog:
* g++.target/riscv/rvv/base/vloxei16-1.C: New test.
* g++.target/riscv/rvv/base/vloxei16-2.C: New test.
* g++.target/riscv/rvv/base/vloxei16-3.C: New test.
* g++.target/riscv/rvv/base/vloxei16_mu-1.C: New test.
* g++.target/riscv/rvv/base/vloxei16_mu-2.C: New test.
* g++.target/riscv/rvv/base/vloxei16_mu-3.C: New test.
* g++.target/riscv/rvv/base/vloxei16_tu-1.C: New test.
* g++.target/riscv/rvv/base/vloxei16_tu-2.C: New test.
* g++.target/riscv/rvv/base/vloxei16_tu-3.C: New test.
* g++.target/riscv/rvv/base/vloxei16_tum-1.C: New test.
* g++.target/riscv/rvv/base/vloxei16_tum-2.C: New test.
* g++.target/riscv/rvv/base/vloxei16_tum-3.C: New test.
* g++.target/riscv/rvv/base/vloxei16_tumu-1.C: New test.
* g++.target/riscv/rvv/base/vloxei16_tumu-2.C: New test.
* g++.target/riscv/rvv/base/vloxei16_tumu-3.C: New test.
Ju-Zhe Zhong [Sun, 29 Jan 2023 23:35:38 +0000 (07:35 +0800)]
RISC-V: Add vloxei8 C++ API intrinsic testcase
gcc/testsuite/ChangeLog:
* g++.target/riscv/rvv/base/vloxei8-1.C: New test.
* g++.target/riscv/rvv/base/vloxei8-2.C: New test.
* g++.target/riscv/rvv/base/vloxei8-3.C: New test.
* g++.target/riscv/rvv/base/vloxei8_mu-1.C: New test.
* g++.target/riscv/rvv/base/vloxei8_mu-2.C: New test.
* g++.target/riscv/rvv/base/vloxei8_mu-3.C: New test.
* g++.target/riscv/rvv/base/vloxei8_tu-1.C: New test.
* g++.target/riscv/rvv/base/vloxei8_tu-2.C: New test.
* g++.target/riscv/rvv/base/vloxei8_tu-3.C: New test.
* g++.target/riscv/rvv/base/vloxei8_tum-1.C: New test.
* g++.target/riscv/rvv/base/vloxei8_tum-2.C: New test.
* g++.target/riscv/rvv/base/vloxei8_tum-3.C: New test.
* g++.target/riscv/rvv/base/vloxei8_tumu-1.C: New test.
* g++.target/riscv/rvv/base/vloxei8_tumu-2.C: New test.
* g++.target/riscv/rvv/base/vloxei8_tumu-3.C: New test.
Ju-Zhe Zhong [Sun, 29 Jan 2023 23:33:49 +0000 (07:33 +0800)]
RISC-V: Add vluxei64 C++ API intrinsic testcases
gcc/testsuite/ChangeLog:
* g++.target/riscv/rvv/base/vluxei64-1.C: New test.
* g++.target/riscv/rvv/base/vluxei64-2.C: New test.
* g++.target/riscv/rvv/base/vluxei64-3.C: New test.
* g++.target/riscv/rvv/base/vluxei64_mu-1.C: New test.
* g++.target/riscv/rvv/base/vluxei64_mu-2.C: New test.
* g++.target/riscv/rvv/base/vluxei64_mu-3.C: New test.
* g++.target/riscv/rvv/base/vluxei64_tu-1.C: New test.
* g++.target/riscv/rvv/base/vluxei64_tu-2.C: New test.
* g++.target/riscv/rvv/base/vluxei64_tu-3.C: New test.
* g++.target/riscv/rvv/base/vluxei64_tum-1.C: New test.
* g++.target/riscv/rvv/base/vluxei64_tum-2.C: New test.
* g++.target/riscv/rvv/base/vluxei64_tum-3.C: New test.
* g++.target/riscv/rvv/base/vluxei64_tumu-1.C: New test.
* g++.target/riscv/rvv/base/vluxei64_tumu-2.C: New test.
* g++.target/riscv/rvv/base/vluxei64_tumu-3.C: New test.
Ju-Zhe Zhong [Sun, 29 Jan 2023 23:32:09 +0000 (07:32 +0800)]
RISC-V: Add vluxei32 C++ intrinsic API testcase
gcc/testsuite/ChangeLog:
* g++.target/riscv/rvv/base/vluxei32-1.C: New test.
* g++.target/riscv/rvv/base/vluxei32-2.C: New test.
* g++.target/riscv/rvv/base/vluxei32-3.C: New test.
* g++.target/riscv/rvv/base/vluxei32_mu-1.C: New test.
* g++.target/riscv/rvv/base/vluxei32_mu-2.C: New test.
* g++.target/riscv/rvv/base/vluxei32_mu-3.C: New test.
* g++.target/riscv/rvv/base/vluxei32_tu-1.C: New test.
* g++.target/riscv/rvv/base/vluxei32_tu-2.C: New test.
* g++.target/riscv/rvv/base/vluxei32_tu-3.C: New test.
* g++.target/riscv/rvv/base/vluxei32_tum-1.C: New test.
* g++.target/riscv/rvv/base/vluxei32_tum-2.C: New test.
* g++.target/riscv/rvv/base/vluxei32_tum-3.C: New test.
* g++.target/riscv/rvv/base/vluxei32_tumu-1.C: New test.
* g++.target/riscv/rvv/base/vluxei32_tumu-2.C: New test.
* g++.target/riscv/rvv/base/vluxei32_tumu-3.C: New test.
Ju-Zhe Zhong [Sun, 29 Jan 2023 23:28:33 +0000 (07:28 +0800)]
RISC-V: Add vluxei16 C++ API intrinsic testcases
gcc/testsuite/ChangeLog:
* g++.target/riscv/rvv/base/vluxei16-1.C: New test.
* g++.target/riscv/rvv/base/vluxei16-2.C: New test.
* g++.target/riscv/rvv/base/vluxei16-3.C: New test.
* g++.target/riscv/rvv/base/vluxei16_mu-1.C: New test.
* g++.target/riscv/rvv/base/vluxei16_mu-2.C: New test.
* g++.target/riscv/rvv/base/vluxei16_mu-3.C: New test.
* g++.target/riscv/rvv/base/vluxei16_tu-1.C: New test.
* g++.target/riscv/rvv/base/vluxei16_tu-2.C: New test.
* g++.target/riscv/rvv/base/vluxei16_tu-3.C: New test.
* g++.target/riscv/rvv/base/vluxei16_tum-1.C: New test.
* g++.target/riscv/rvv/base/vluxei16_tum-2.C: New test.
* g++.target/riscv/rvv/base/vluxei16_tum-3.C: New test.
* g++.target/riscv/rvv/base/vluxei16_tumu-1.C: New test.
* g++.target/riscv/rvv/base/vluxei16_tumu-2.C: New test.
* g++.target/riscv/rvv/base/vluxei16_tumu-3.C: New test.
Ju-Zhe Zhong [Sun, 29 Jan 2023 23:26:25 +0000 (07:26 +0800)]
RISC-V: Add vluxei8 C++ API intrinsic testcase
gcc/testsuite/ChangeLog:
* g++.target/riscv/rvv/base/vluxei8-1.C: New test.
* g++.target/riscv/rvv/base/vluxei8-2.C: New test.
* g++.target/riscv/rvv/base/vluxei8-3.C: New test.
* g++.target/riscv/rvv/base/vluxei8_mu-1.C: New test.
* g++.target/riscv/rvv/base/vluxei8_mu-2.C: New test.
* g++.target/riscv/rvv/base/vluxei8_mu-3.C: New test.
* g++.target/riscv/rvv/base/vluxei8_tu-1.C: New test.
* g++.target/riscv/rvv/base/vluxei8_tu-2.C: New test.
* g++.target/riscv/rvv/base/vluxei8_tu-3.C: New test.
* g++.target/riscv/rvv/base/vluxei8_tum-1.C: New test.
* g++.target/riscv/rvv/base/vluxei8_tum-2.C: New test.
* g++.target/riscv/rvv/base/vluxei8_tum-3.C: New test.
* g++.target/riscv/rvv/base/vluxei8_tumu-1.C: New test.
* g++.target/riscv/rvv/base/vluxei8_tumu-2.C: New test.
* g++.target/riscv/rvv/base/vluxei8_tumu-3.C: New test.
Ju-Zhe Zhong [Sun, 29 Jan 2023 23:24:01 +0000 (07:24 +0800)]
RISC-V: Add vsuxei* C++ API intrinsics testcases
gcc/testsuite/ChangeLog:
* g++.target/riscv/rvv/base/vsuxei16-1.C: New test.
* g++.target/riscv/rvv/base/vsuxei16-2.C: New test.
* g++.target/riscv/rvv/base/vsuxei16-3.C: New test.
* g++.target/riscv/rvv/base/vsuxei32-1.C: New test.
* g++.target/riscv/rvv/base/vsuxei32-2.C: New test.
* g++.target/riscv/rvv/base/vsuxei32-3.C: New test.
* g++.target/riscv/rvv/base/vsuxei64-1.C: New test.
* g++.target/riscv/rvv/base/vsuxei64-2.C: New test.
* g++.target/riscv/rvv/base/vsuxei64-3.C: New test.
* g++.target/riscv/rvv/base/vsuxei8-1.C: New test.
* g++.target/riscv/rvv/base/vsuxei8-2.C: New test.
* g++.target/riscv/rvv/base/vsuxei8-3.C: New test.
Ju-Zhe Zhong [Sun, 29 Jan 2023 23:18:34 +0000 (07:18 +0800)]
RISC-V: Add vsuxei C API intrinsic testcase
gcc/testsuite/ChangeLog:
* gcc.target/riscv/rvv/base/vsuxei16_v-1.c: New test.
* gcc.target/riscv/rvv/base/vsuxei16_v-2.c: New test.
* gcc.target/riscv/rvv/base/vsuxei16_v-3.c: New test.
* gcc.target/riscv/rvv/base/vsuxei16_v_m-1.c: New test.
* gcc.target/riscv/rvv/base/vsuxei16_v_m-2.c: New test.
* gcc.target/riscv/rvv/base/vsuxei16_v_m-3.c: New test.
* gcc.target/riscv/rvv/base/vsuxei32_v-1.c: New test.
* gcc.target/riscv/rvv/base/vsuxei32_v-2.c: New test.
* gcc.target/riscv/rvv/base/vsuxei32_v-3.c: New test.
* gcc.target/riscv/rvv/base/vsuxei32_v_m-1.c: New test.
* gcc.target/riscv/rvv/base/vsuxei32_v_m-2.c: New test.
* gcc.target/riscv/rvv/base/vsuxei32_v_m-3.c: New test.
* gcc.target/riscv/rvv/base/vsuxei64_v-1.c: New test.
* gcc.target/riscv/rvv/base/vsuxei64_v-2.c: New test.
* gcc.target/riscv/rvv/base/vsuxei64_v-3.c: New test.
* gcc.target/riscv/rvv/base/vsuxei64_v_m-1.c: New test.
* gcc.target/riscv/rvv/base/vsuxei64_v_m-2.c: New test.
* gcc.target/riscv/rvv/base/vsuxei64_v_m-3.c: New test.
* gcc.target/riscv/rvv/base/vsuxei8_v-1.c: New test.
* gcc.target/riscv/rvv/base/vsuxei8_v-2.c: New test.
* gcc.target/riscv/rvv/base/vsuxei8_v-3.c: New test.
* gcc.target/riscv/rvv/base/vsuxei8_v_m-1.c: New test.
* gcc.target/riscv/rvv/base/vsuxei8_v_m-2.c: New test.
* gcc.target/riscv/rvv/base/vsuxei8_v_m-3.c: New test.
Ju-Zhe Zhong [Sun, 29 Jan 2023 23:16:58 +0000 (07:16 +0800)]
RISC-V: Add vsoxei C API intrinsic testcase
gcc/testsuite/ChangeLog:
* gcc.target/riscv/rvv/base/vsoxei16_v-1.c: New test.
* gcc.target/riscv/rvv/base/vsoxei16_v-2.c: New test.
* gcc.target/riscv/rvv/base/vsoxei16_v-3.c: New test.
* gcc.target/riscv/rvv/base/vsoxei16_v_m-1.c: New test.
* gcc.target/riscv/rvv/base/vsoxei16_v_m-2.c: New test.
* gcc.target/riscv/rvv/base/vsoxei16_v_m-3.c: New test.
* gcc.target/riscv/rvv/base/vsoxei32_v-1.c: New test.
* gcc.target/riscv/rvv/base/vsoxei32_v-2.c: New test.
* gcc.target/riscv/rvv/base/vsoxei32_v-3.c: New test.
* gcc.target/riscv/rvv/base/vsoxei32_v_m-1.c: New test.
* gcc.target/riscv/rvv/base/vsoxei32_v_m-2.c: New test.
* gcc.target/riscv/rvv/base/vsoxei32_v_m-3.c: New test.
* gcc.target/riscv/rvv/base/vsoxei64_v-1.c: New test.
* gcc.target/riscv/rvv/base/vsoxei64_v-2.c: New test.
* gcc.target/riscv/rvv/base/vsoxei64_v-3.c: New test.
* gcc.target/riscv/rvv/base/vsoxei64_v_m-1.c: New test.
* gcc.target/riscv/rvv/base/vsoxei64_v_m-2.c: New test.
* gcc.target/riscv/rvv/base/vsoxei64_v_m-3.c: New test.
* gcc.target/riscv/rvv/base/vsoxei8_v-1.c: New test.
* gcc.target/riscv/rvv/base/vsoxei8_v-2.c: New test.
* gcc.target/riscv/rvv/base/vsoxei8_v-3.c: New test.
* gcc.target/riscv/rvv/base/vsoxei8_v_m-1.c: New test.
* gcc.target/riscv/rvv/base/vsoxei8_v_m-2.c: New test.
* gcc.target/riscv/rvv/base/vsoxei8_v_m-3.c: New test.
Ju-Zhe Zhong [Sun, 29 Jan 2023 23:14:44 +0000 (07:14 +0800)]
RISC-V: Add vsoxei32 && vsoxei64 C++ API intrinsic testcase
gcc/testsuite/ChangeLog:
* g++.target/riscv/rvv/base/vsoxei32-1.C: New test.
* g++.target/riscv/rvv/base/vsoxei32-2.C: New test.
* g++.target/riscv/rvv/base/vsoxei32-3.C: New test.
* g++.target/riscv/rvv/base/vsoxei64-1.C: New test.
* g++.target/riscv/rvv/base/vsoxei64-2.C: New test.
* g++.target/riscv/rvv/base/vsoxei64-3.C: New test.
Ju-Zhe Zhong [Sun, 29 Jan 2023 23:11:40 +0000 (07:11 +0800)]
RISC-V: Add vsoxei8 && vsoxei16 C++ API intrinsic testcase
gcc/testsuite/ChangeLog:
* g++.target/riscv/rvv/base/vsoxei16-1.C: New test.
* g++.target/riscv/rvv/base/vsoxei16-2.C: New test.
* g++.target/riscv/rvv/base/vsoxei16-3.C: New test.
* g++.target/riscv/rvv/base/vsoxei8-1.C: New test.
* g++.target/riscv/rvv/base/vsoxei8-2.C: New test.
* g++.target/riscv/rvv/base/vsoxei8-3.C: New test.
Ju-Zhe Zhong [Sun, 29 Jan 2023 23:08:30 +0000 (07:08 +0800)]
RISC-V: Add vluxei64 C API intrinsic testcases
gcc/testsuite/ChangeLog:
* gcc.target/riscv/rvv/base/vluxei64_v-1.c: New test.
* gcc.target/riscv/rvv/base/vluxei64_v-2.c: New test.
* gcc.target/riscv/rvv/base/vluxei64_v-3.c: New test.
* gcc.target/riscv/rvv/base/vluxei64_v_m-1.c: New test.
* gcc.target/riscv/rvv/base/vluxei64_v_m-2.c: New test.
* gcc.target/riscv/rvv/base/vluxei64_v_m-3.c: New test.
* gcc.target/riscv/rvv/base/vluxei64_v_mu-1.c: New test.
* gcc.target/riscv/rvv/base/vluxei64_v_mu-2.c: New test.
* gcc.target/riscv/rvv/base/vluxei64_v_mu-3.c: New test.
* gcc.target/riscv/rvv/base/vluxei64_v_tu-1.c: New test.
* gcc.target/riscv/rvv/base/vluxei64_v_tu-2.c: New test.
* gcc.target/riscv/rvv/base/vluxei64_v_tu-3.c: New test.
* gcc.target/riscv/rvv/base/vluxei64_v_tum-1.c: New test.
* gcc.target/riscv/rvv/base/vluxei64_v_tum-2.c: New test.
* gcc.target/riscv/rvv/base/vluxei64_v_tum-3.c: New test.
* gcc.target/riscv/rvv/base/vluxei64_v_tumu-1.c: New test.
* gcc.target/riscv/rvv/base/vluxei64_v_tumu-2.c: New test.
* gcc.target/riscv/rvv/base/vluxei64_v_tumu-3.c: New test.
Ju-Zhe Zhong [Sun, 29 Jan 2023 23:06:32 +0000 (07:06 +0800)]
RISC-V: Add vluxei32 C API intrinsic testcases
gcc/testsuite/ChangeLog:
* gcc.target/riscv/rvv/base/vluxei32_v-1.c: New test.
* gcc.target/riscv/rvv/base/vluxei32_v-2.c: New test.
* gcc.target/riscv/rvv/base/vluxei32_v-3.c: New test.
* gcc.target/riscv/rvv/base/vluxei32_v_m-1.c: New test.
* gcc.target/riscv/rvv/base/vluxei32_v_m-2.c: New test.
* gcc.target/riscv/rvv/base/vluxei32_v_m-3.c: New test.
* gcc.target/riscv/rvv/base/vluxei32_v_mu-1.c: New test.
* gcc.target/riscv/rvv/base/vluxei32_v_mu-2.c: New test.
* gcc.target/riscv/rvv/base/vluxei32_v_mu-3.c: New test.
* gcc.target/riscv/rvv/base/vluxei32_v_tu-1.c: New test.
* gcc.target/riscv/rvv/base/vluxei32_v_tu-2.c: New test.
* gcc.target/riscv/rvv/base/vluxei32_v_tu-3.c: New test.
* gcc.target/riscv/rvv/base/vluxei32_v_tum-1.c: New test.
* gcc.target/riscv/rvv/base/vluxei32_v_tum-2.c: New test.
* gcc.target/riscv/rvv/base/vluxei32_v_tum-3.c: New test.
* gcc.target/riscv/rvv/base/vluxei32_v_tumu-1.c: New test.
* gcc.target/riscv/rvv/base/vluxei32_v_tumu-2.c: New test.
* gcc.target/riscv/rvv/base/vluxei32_v_tumu-3.c: New test.
Ju-Zhe Zhong [Sun, 29 Jan 2023 22:56:39 +0000 (06:56 +0800)]
RISC-V: Add vluxei16 C API intrinsic testcases
gcc/testsuite/ChangeLog:
* gcc.target/riscv/rvv/base/vluxei16_v-1.c: New test.
* gcc.target/riscv/rvv/base/vluxei16_v-2.c: New test.
* gcc.target/riscv/rvv/base/vluxei16_v-3.c: New test.
* gcc.target/riscv/rvv/base/vluxei16_v_m-1.c: New test.
* gcc.target/riscv/rvv/base/vluxei16_v_m-2.c: New test.
* gcc.target/riscv/rvv/base/vluxei16_v_m-3.c: New test.
* gcc.target/riscv/rvv/base/vluxei16_v_mu-1.c: New test.
* gcc.target/riscv/rvv/base/vluxei16_v_mu-2.c: New test.
* gcc.target/riscv/rvv/base/vluxei16_v_mu-3.c: New test.
* gcc.target/riscv/rvv/base/vluxei16_v_tu-1.c: New test.
* gcc.target/riscv/rvv/base/vluxei16_v_tu-2.c: New test.
* gcc.target/riscv/rvv/base/vluxei16_v_tu-3.c: New test.
* gcc.target/riscv/rvv/base/vluxei16_v_tum-1.c: New test.
* gcc.target/riscv/rvv/base/vluxei16_v_tum-2.c: New test.
* gcc.target/riscv/rvv/base/vluxei16_v_tum-3.c: New test.
* gcc.target/riscv/rvv/base/vluxei16_v_tumu-1.c: New test.
* gcc.target/riscv/rvv/base/vluxei16_v_tumu-2.c: New test.
* gcc.target/riscv/rvv/base/vluxei16_v_tumu-3.c: New test.
Ju-Zhe Zhong [Sun, 29 Jan 2023 15:52:35 +0000 (23:52 +0800)]
RISC-V: Add vluxei8 C API intrinsic testcases
gcc/testsuite/ChangeLog:
* gcc.target/riscv/rvv/base/vluxei8_v-1.c: New test.
* gcc.target/riscv/rvv/base/vluxei8_v-2.c: New test.
* gcc.target/riscv/rvv/base/vluxei8_v-3.c: New test.
* gcc.target/riscv/rvv/base/vluxei8_v_m-1.c: New test.
* gcc.target/riscv/rvv/base/vluxei8_v_m-2.c: New test.
* gcc.target/riscv/rvv/base/vluxei8_v_m-3.c: New test.
* gcc.target/riscv/rvv/base/vluxei8_v_mu-1.c: New test.
* gcc.target/riscv/rvv/base/vluxei8_v_mu-2.c: New test.
* gcc.target/riscv/rvv/base/vluxei8_v_mu-3.c: New test.
* gcc.target/riscv/rvv/base/vluxei8_v_tu-1.c: New test.
* gcc.target/riscv/rvv/base/vluxei8_v_tu-2.c: New test.
* gcc.target/riscv/rvv/base/vluxei8_v_tu-3.c: New test.
* gcc.target/riscv/rvv/base/vluxei8_v_tum-1.c: New test.
* gcc.target/riscv/rvv/base/vluxei8_v_tum-2.c: New test.
* gcc.target/riscv/rvv/base/vluxei8_v_tum-3.c: New test.
* gcc.target/riscv/rvv/base/vluxei8_v_tumu-1.c: New test.
* gcc.target/riscv/rvv/base/vluxei8_v_tumu-2.c: New test.
* gcc.target/riscv/rvv/base/vluxei8_v_tumu-3.c: New test.
Ju-Zhe Zhong [Sun, 29 Jan 2023 15:50:34 +0000 (23:50 +0800)]
RISC-V: Add vloxei64 C API intrinsic testcases
gcc/testsuite/ChangeLog:
* gcc.target/riscv/rvv/base/vloxei64_v-1.c: New test.
* gcc.target/riscv/rvv/base/vloxei64_v-2.c: New test.
* gcc.target/riscv/rvv/base/vloxei64_v-3.c: New test.
* gcc.target/riscv/rvv/base/vloxei64_v_m-1.c: New test.
* gcc.target/riscv/rvv/base/vloxei64_v_m-2.c: New test.
* gcc.target/riscv/rvv/base/vloxei64_v_m-3.c: New test.
* gcc.target/riscv/rvv/base/vloxei64_v_mu-1.c: New test.
* gcc.target/riscv/rvv/base/vloxei64_v_mu-2.c: New test.
* gcc.target/riscv/rvv/base/vloxei64_v_mu-3.c: New test.
* gcc.target/riscv/rvv/base/vloxei64_v_tu-1.c: New test.
* gcc.target/riscv/rvv/base/vloxei64_v_tu-2.c: New test.
* gcc.target/riscv/rvv/base/vloxei64_v_tu-3.c: New test.
* gcc.target/riscv/rvv/base/vloxei64_v_tum-1.c: New test.
* gcc.target/riscv/rvv/base/vloxei64_v_tum-2.c: New test.
* gcc.target/riscv/rvv/base/vloxei64_v_tum-3.c: New test.
* gcc.target/riscv/rvv/base/vloxei64_v_tumu-1.c: New test.
* gcc.target/riscv/rvv/base/vloxei64_v_tumu-2.c: New test.
* gcc.target/riscv/rvv/base/vloxei64_v_tumu-3.c: New test.
Ju-Zhe Zhong [Sun, 29 Jan 2023 15:48:46 +0000 (23:48 +0800)]
RISC-V: Add vloxei32 C API intrinsic testcases
gcc/testsuite/ChangeLog:
* gcc.target/riscv/rvv/base/vloxei32_v-1.c: New test.
* gcc.target/riscv/rvv/base/vloxei32_v-2.c: New test.
* gcc.target/riscv/rvv/base/vloxei32_v-3.c: New test.
* gcc.target/riscv/rvv/base/vloxei32_v_m-1.c: New test.
* gcc.target/riscv/rvv/base/vloxei32_v_m-2.c: New test.
* gcc.target/riscv/rvv/base/vloxei32_v_m-3.c: New test.
* gcc.target/riscv/rvv/base/vloxei32_v_mu-1.c: New test.
* gcc.target/riscv/rvv/base/vloxei32_v_mu-2.c: New test.
* gcc.target/riscv/rvv/base/vloxei32_v_mu-3.c: New test.
* gcc.target/riscv/rvv/base/vloxei32_v_tu-1.c: New test.
* gcc.target/riscv/rvv/base/vloxei32_v_tu-2.c: New test.
* gcc.target/riscv/rvv/base/vloxei32_v_tu-3.c: New test.
* gcc.target/riscv/rvv/base/vloxei32_v_tum-1.c: New test.
* gcc.target/riscv/rvv/base/vloxei32_v_tum-2.c: New test.
* gcc.target/riscv/rvv/base/vloxei32_v_tum-3.c: New test.
* gcc.target/riscv/rvv/base/vloxei32_v_tumu-1.c: New test.
* gcc.target/riscv/rvv/base/vloxei32_v_tumu-2.c: New test.
* gcc.target/riscv/rvv/base/vloxei32_v_tumu-3.c: New test.
Ju-Zhe Zhong [Sun, 29 Jan 2023 15:46:54 +0000 (23:46 +0800)]
RISC-V: Add vloxei16 C API intrinsic testcases
gcc/testsuite/ChangeLog:
* gcc.target/riscv/rvv/base/vloxei16_v-1.c: New test.
* gcc.target/riscv/rvv/base/vloxei16_v-2.c: New test.
* gcc.target/riscv/rvv/base/vloxei16_v-3.c: New test.
* gcc.target/riscv/rvv/base/vloxei16_v_m-1.c: New test.
* gcc.target/riscv/rvv/base/vloxei16_v_m-2.c: New test.
* gcc.target/riscv/rvv/base/vloxei16_v_m-3.c: New test.
* gcc.target/riscv/rvv/base/vloxei16_v_mu-1.c: New test.
* gcc.target/riscv/rvv/base/vloxei16_v_mu-2.c: New test.
* gcc.target/riscv/rvv/base/vloxei16_v_mu-3.c: New test.
* gcc.target/riscv/rvv/base/vloxei16_v_tu-1.c: New test.
* gcc.target/riscv/rvv/base/vloxei16_v_tu-2.c: New test.
* gcc.target/riscv/rvv/base/vloxei16_v_tu-3.c: New test.
* gcc.target/riscv/rvv/base/vloxei16_v_tum-1.c: New test.
* gcc.target/riscv/rvv/base/vloxei16_v_tum-2.c: New test.
* gcc.target/riscv/rvv/base/vloxei16_v_tum-3.c: New test.
* gcc.target/riscv/rvv/base/vloxei16_v_tumu-1.c: New test.
* gcc.target/riscv/rvv/base/vloxei16_v_tumu-2.c: New test.
* gcc.target/riscv/rvv/base/vloxei16_v_tumu-3.c: New test.
Ju-Zhe Zhong [Sun, 29 Jan 2023 15:44:24 +0000 (23:44 +0800)]
RISC-V: Add vloxei8 C API intrinsic testcases
gcc/testsuite/ChangeLog:
* gcc.target/riscv/rvv/base/vloxei8_v-1.c: New test.
* gcc.target/riscv/rvv/base/vloxei8_v-2.c: New test.
* gcc.target/riscv/rvv/base/vloxei8_v-3.c: New test.
* gcc.target/riscv/rvv/base/vloxei8_v_m-1.c: New test.
* gcc.target/riscv/rvv/base/vloxei8_v_m-2.c: New test.
* gcc.target/riscv/rvv/base/vloxei8_v_m-3.c: New test.
* gcc.target/riscv/rvv/base/vloxei8_v_mu-1.c: New test.
* gcc.target/riscv/rvv/base/vloxei8_v_mu-2.c: New test.
* gcc.target/riscv/rvv/base/vloxei8_v_mu-3.c: New test.
* gcc.target/riscv/rvv/base/vloxei8_v_tu-1.c: New test.
* gcc.target/riscv/rvv/base/vloxei8_v_tu-2.c: New test.
* gcc.target/riscv/rvv/base/vloxei8_v_tu-3.c: New test.
* gcc.target/riscv/rvv/base/vloxei8_v_tum-1.c: New test.
* gcc.target/riscv/rvv/base/vloxei8_v_tum-2.c: New test.
* gcc.target/riscv/rvv/base/vloxei8_v_tum-3.c: New test.
* gcc.target/riscv/rvv/base/vloxei8_v_tumu-1.c: New test.
* gcc.target/riscv/rvv/base/vloxei8_v_tumu-2.c: New test.
* gcc.target/riscv/rvv/base/vloxei8_v_tumu-3.c: New test.
Ju-Zhe Zhong [Sun, 29 Jan 2023 15:34:57 +0000 (23:34 +0800)]
RISC-V: Add VSETVL testcases for indexed loads/stores.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/rvv/vsetvl/avl_single-72.c: New test.
* gcc.target/riscv/rvv/vsetvl/avl_single-76.c: New test.
* gcc.target/riscv/rvv/vsetvl/avl_single-77.c: New test.
Flavio Cruz [Fri, 27 Jan 2023 03:45:27 +0000 (22:45 -0500)]
Add support for x86_64-*-gnu-* targets to build x86_64 gnumach/hurd
Tested by building a toolchain and compiling gnumach for x86_64 [1].
This is the basic version without unwind support which I think is only
required to implement exceptions.
gcc/ChangeLog:
* config.gcc: Recognize x86_64-*-gnu* targets and include
i386/gnu64.h.
* config/i386/gnu64.h: Define configuration for new target
including ld.so location.
libgcc/ChangeLog:
* config.host: Recognize x86_64-*-gnu* targets.
* config/i386/gnu-unwind.h: Update to handle __x86_64__ with a
TODO for now.
Andrew Pinski [Sat, 28 Jan 2023 18:27:08 +0000 (18:27 +0000)]
Fix PR 108582: ICE due to PHI-OPT removing a still in use ssa_name.
This patch adds a check in match_simplify_replacement to make sure the middlebb
does not have any phi-nodes as we don't currently move those.
This was just a thinko from before.
Ok? Bootstrapped and tested on x86_64-linux-gnu with no regressions?
PR tree-optimization/108582
gcc/ChangeLog:
* tree-ssa-phiopt.cc (match_simplify_replacement): Add check
for middlebb to have no phi nodes.
Richard Biener [Mon, 30 Jan 2023 08:25:23 +0000 (09:25 +0100)]
tree-optimization/108574 - wrong-code with PRE PHI node processing
The PR108523 was too optimistic in replacing the same value with
an equivalence from a possibly not taken edge. The following
rectifies this and instead refrains from using the equivalence in
the problematic cases.
PR tree-optimization/108574
* tree-ssa-sccvn.cc (visit_phi): Instead of swapping
sameval and def, ignore the equivalence if there's the
danger of oscillating between two values.
* gcc.dg/torture/pr108574-1.c: New testcase.
* gcc.dg/torture/pr108574-2.c: Likewise.
* gcc.dg/torture/pr108574-3.c: Likewise.
YunQiang Su [Fri, 6 Jan 2023 10:15:28 +0000 (18:15 +0800)]
Set CROSS_SYSTEM_HEADER_DIR according includedir
For cross building with option:
--sysroot=/ --prefix=/usr --includedir=/usr/<triple>
just like Debian does, fixinc.sh will use the wrong header files
from /usr/include.
gcc/
* Makefile.in (CROSS_SYSTEM_HEADER_DIR): set according the
value of includedir.
Richard Biener [Mon, 30 Jan 2023 07:20:03 +0000 (08:20 +0100)]
ipa/108511 - relax assert for undefined local statics
Since we no longer promote undefined local statics extern the
assert in possibly_call_in_translation_unit_p triggers. The
following relaxes it according to Honzas advice.
Mikael Morin [Sun, 29 Jan 2023 20:57:24 +0000 (21:57 +0100)]
fortran: Set name for *LOC default BACK argument [PR108450]
This change fixes an ICE caused by the double resolution of MINLOC,
MAXLOC and FINDLOC expressions which get a default value for the BACK
argument at resolution time. That argument is added without name,
and argument reordering code is not prepared to handle unnamed arguments
coming after named ones, so the second resolution causes a NULL pointer
dereference.
The problem is fixed by explicitly setting the argument name.
PR fortran/108450
gcc/fortran/ChangeLog:
* check.cc (gfc_check_minloc_maxloc): Explicitly set argument name.
(gfc_check_findloc): Ditto.
Jan Hubicka [Sun, 29 Jan 2023 00:27:26 +0000 (01:27 +0100)]
Fix find_always_executed_bbs handling of infinite loops
This patch fixes the stupid typo info find_always_executed_bbs which made
all edges to be considered as ones closing infinite loops. This fix has
somewhat snowballed as, comparing it to finite_function_p, I noticed a
divergence in handling of volatile asms (find_always_executed_bbs is conservative
and thinks that volatile statement may return or do EH, but it is really
impossible and elsewhere we expects that we dont) and I also noticed
a bug in handling early returns which made some loops to be missed.
I also noticed that function assumes that irreducible loops are marked in CFG
which is not necessarily true and it is easy to detect them during the walk.
Bootstrapped/regtested x86_64-linux, comitted.
gcc/ChangeLog:
2023-01-29 Jan Hubicka <hubicka@ucw.cz>
* ipa-utils.cc: Include calls.h, cfgloop.h and cfganal.h
(stmt_may_terminate_function_p): If assuming return or EH
volatile asm is safe.
(find_always_executed_bbs): Fix handling of terminating BBS and
infinite loops; add debug output.
* tree-ssa-alias.cc (stmt_kills_ref_p): Fix debug output
gcc/testsuite/ChangeLog:
2023-01-29 Jan Hubicka <hubicka@ucw.cz>
* gcc.dg/ipa/ipa-sra-30.c: New test.
* gcc.dg/ipa/ipa-sra-31.c: New test.
* gcc.dg/tree-ssa/modref-dse-7.c: New test.
Gerald Pfeifer [Sat, 28 Jan 2023 22:07:01 +0000 (23:07 +0100)]
libstdc++: Update links in the "Contributing" manual
libstdc++-v3/ChangeLog:
* doc/xml/manual/appendix_contributing.xml: Adjust link to
ISO C++ standard at ANSI.
Move link to www.open-std.org to https.
* doc/html/manual/appendix_contributing.html: Regenerate.
Harald Anlauf [Tue, 24 Jan 2023 21:36:25 +0000 (22:36 +0100)]
Fortran: fix ICE in compare_bound_int [PR108527]
gcc/fortran/ChangeLog:
PR fortran/108527
* resolve.cc (compare_bound_int): Expression to compare must be of
type INTEGER.
(compare_bound_mpz_t): Likewise.
(check_dimension): Fix comment on checks applied to array section
and clean up associated logic.
gcc/testsuite/ChangeLog:
PR fortran/108527
* gfortran.dg/pr108527.f90: New test.
Co-authored-by: Steven G. Kargl <kargl@gcc.gnu.org>
Jonathan Yong [Wed, 11 Jan 2023 09:51:02 +0000 (09:51 +0000)]
PR c/108192 - Fix test for mingw
gcc/testsuite/ChangeLog:
PR c/108192
* g++.dg/cet-notrack-1.C: Use puts instead of printf,
so function call is not mangled by __mingw_printf when
doing assembly symbol inspection.