Improve handling of function inlining a bit more - #32
Open
GuillaumeGomez wants to merge 59 commits into
Open
Conversation
… when generating some code using target-specific builtins
…o allow recursive types
gcc/config/i386: PR jit/TODO * i386-builtins.cc: New function (clear_builtin_types). gcc/jit: PR jit/TODO * dummy-frontend.cc: Include headers target.h, jit-recording.h, unordered_map and string, new variables (target_function_types, and target_builtins_ctxt), new function (tree_type_to_jit_type). * jit-builtins.cc: Specify that the function types are not from target builtins. * jit-playback.cc: New argument is_target_builtin to new_function. * jit-playback.h * jit-recording.cc * jit-recording.h * libgccjit.cc * libgccjit.h * libgccjit.map gcc/testsuite/jit.dg: PR jit/TODO * all-non-failing-tests.h * test-target-builtins.c
Fix compilation error when bfloat is unsupported
Add test for cold attribute in libgccjit
fixup! WIP: Add support for function attributes
Add ability to get CPU features
Add support for returns_twice attribute in libgccjit
antoyo
force-pushed
the
master
branch
3 times, most recently
from
November 21, 2024 16:03
5de134e to
ec8ae43
Compare
antoyo
force-pushed
the
master
branch
3 times, most recently
from
April 30, 2025 16:36
b8f4bbf to
04ce66d
Compare
antoyo
force-pushed
the
master
branch
2 times, most recently
from
August 28, 2025 15:44
2ae4b0e to
4a8c8ec
Compare
antoyo
force-pushed
the
master
branch
5 times, most recently
from
October 10, 2025 01:38
839fe51 to
28b84db
Compare
antoyo
force-pushed
the
master
branch
4 times, most recently
from
October 28, 2025 18:15
7103c89 to
8cdf7b8
Compare
antoyo
force-pushed
the
master
branch
2 times, most recently
from
January 30, 2026 14:46
8960457 to
efdd0a7
Compare
antoyo
force-pushed
the
master
branch
2 times, most recently
from
February 25, 2026 14:57
338d3f3 to
2e6a09a
Compare
antoyo
force-pushed
the
master
branch
4 times, most recently
from
July 14, 2026 01:42
f217927 to
248e431
Compare
GuillaumeGomez
pushed a commit
to GuillaumeGomez/gcc
that referenced
this pull request
Sep 1, 2026
…26597]
aarch64_expand_vec_perm_const_1 normalizes a permutation whose first index
selects the second operand by rotating the indices and swapping op0 and op1.
It left zero_op0_p and zero_op1_p pointing at the old operands, so the later
recognizers that consult them, aarch64_evpc_and and aarch64_evpc_tbl, read
the wrong vector.
Swap the two flags together with the operands.
For
typedef int v4si __attribute__ ((vector_size (16)));
v4si f (v4si x)
{
const v4si m = { 4, 1, 2, 3 };
return __builtin_shuffle (x, (v4si) { 0, 0, 0, 0 }, m);
}
at -O0 the AND was applied to the all-zero operand, so the function returned
{0,0,0,0} instead of {0,x1,x2,x3}:
sub sp, sp, rust-lang#32
str q0, [sp]
adrp x0, .LC0
add x0, x0, :lo12:.LC0
ldr q31, [x0]
str q31, [sp, 16]
movi v31.4s, 0
fmov s31, s31
mov v0.16b, v31.16b
add sp, sp, 32
ret
With the fix the AND is applied to the incoming vector:
sub sp, sp, rust-lang#32
str q0, [sp]
adrp x0, .LC0
add x0, x0, :lo12:.LC0
ldr q31, [x0]
str q31, [sp, 16]
ldr q30, [sp]
adrp x0, .LC1
add x0, x0, :lo12:.LC1
ldr q31, [x0]
and v31.16b, v30.16b, v31.16b
mov v0.16b, v31.16b
add sp, sp, 32
ret
Bootstrapped and tested on aarch64-none-linux-gnu.
gcc/ChangeLog:
PR target/126597
* config/aarch64/aarch64.cc (aarch64_expand_vec_perm_const_1): Swap
zero_op0_p and zero_op1_p along with the operands.
gcc/testsuite/ChangeLog:
PR target/126597
* gcc.target/aarch64/pr126597.c: New test.
Signed-off-by: Kyrylo Tkachov <ktkachov@nvidia.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.