Re: [PATCH] RISC-V: add option -m(no-)autovec-segment

2024-02-27 Thread Greg McGary
On 2/27/24 8:25 AM, Jeff Law wrote: On 2/25/24 21:53, Greg McGary wrote: Add option -m(no-)autovec-segment to enable/disable autovectorizer from emitting vector segment load/store instructions. This is useful for performance experiments. gcc/ChangeLog: * config/riscv/autovec.md

Re: [PATCH] combine: Don't simplify paradoxical SUBREG on WORD_REGISTER_OPERATIONS [PR113010]

2024-02-27 Thread Greg McGary
On 2/26/24 5:17 PM, Greg McGary wrote: diff --git a/gcc/testsuite/gcc.c-torture/execute/pr113010.c b/gcc/testsuite/gcc.c-torture/execute/pr113010.c new file mode 100644 index 000..a95c613c1df --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/pr113010.c @@ -0,0 +1,9 @@ +int

[PATCH] combine: Don't simplify paradoxical SUBREG on WORD_REGISTER_OPERATIONS [PR113010]

2024-02-26 Thread Greg McGary
The sign-bit-copies of a sign-extending load cannot be known until runtime on WORD_REGISTER_OPERATIONS targets, except in the case of a zero-extending MEM load. See the fix for PR112758. 2024-02-22 Greg McGary PR rtl-optimization/113010 * combine.cc (simplify_comparison

[PATCH] RISC-V: add option -m(no-)autovec-segment

2024-02-25 Thread Greg McGary
Add option -m(no-)autovec-segment to enable/disable autovectorizer from emitting vector segment load/store instructions. This is useful for performance experiments. gcc/ChangeLog: * config/riscv/autovec.md (vec_mask_len_load_lanes, vec_mask_len_store_lanes): Predicate with

Re: [PATCH] combine: Don't simplify high part of paradoxical-SUBREG-of-MEM on machines that sign-extend loads [PR113010]

2024-02-23 Thread Greg McGary
On 2/22/24 2:08 PM, Jakub Jelinek wrote: On Thu, Feb 22, 2024 at 12:59:18PM -0800, Greg McGary wrote: The sign bit of a sign-extending load cannot be known until runtime, so don't attempt to simplify it in the combiner. 2024-02-22 Greg McGary PR rtl-optimization/113010

[PATCH] combine: Don't simplify high part of paradoxical-SUBREG-of-MEM on machines that sign-extend loads [PR113010]

2024-02-22 Thread Greg McGary
The sign bit of a sign-extending load cannot be known until runtime, so don't attempt to simplify it in the combiner. 2024-02-22 Greg McGary PR rtl-optimization/113010 * combine.cc (simplify_comparison): Don't simplify high part of paradoxical-SUBREG-of-MEM on machines

Re: [PATCH] combine: Don't optimize SIGN_EXTEND of MEM on WORD_REGISTER_OPERATIONS targets [PR113010]

2024-02-07 Thread Greg McGary
On 2/4/24 9:58 PM, Jeff Law wrote: On 2/2/24 15:48, Greg McGary wrote: input: (sign_extend:DI (mem/c:SI (symbol_ref:DI ("minus_1") [flags 0x86] ) [1 minus_1+0 S4 A32])) result: (subreg:DI (mem/c:SI (symbol_ref:DI ("minus_1") [flags 0x86] ) [1 minus_1+0 S4 A32]) 0)

Re: [PATCH] combine: Don't optimize SIGN_EXTEND of MEM on WORD_REGISTER_OPERATIONS targets [PR113010]

2024-02-02 Thread Greg McGary
On 2/1/24 10:24 PM, Jeff Law wrote: On 2/1/24 18:24, Greg McGary wrote: However, for a machine where (WORD_REGISTER_OPERATIONS && load_extend_op (inner_mode) == SIGN_EXTEND), the high part of a PSoM is  only known at runtime as 0s or 1s. That's the downstream bug. The fix for such

Re: [PATCH] combine: Don't optimize SIGN_EXTEND of MEM on WORD_REGISTER_OPERATIONS targets [PR113010]

2024-02-01 Thread Greg McGary
On 1/18/24 9:24 AM, Jeff Law wrote: On 1/17/24 20:53, Greg McGary wrote: While the code comment is true, perhaps it obscures the primary intent, which is recognition that the pattern (SIGN_EXTEND (mem ...) ) is destined to expand into a single memory-load instruction and no simplification

Re: [PATCH] combine: Don't optimize SIGN_EXTEND of MEM on WORD_REGISTER_OPERATIONS targets [PR113010]

2024-01-17 Thread Greg McGary
On Tue, Jan 16, 2024 at 11:44 PM Richard Biener wrote: > > On Tue, Jan 16, 2024 at 11:20 PM Greg McGary wrote: > > > > > > The sign bit of a sign-extending load cannot be known until runtime, > > > so don't attempt to simplify it in the combiner. >

[PATCH] combine: Don't optimize SIGN_EXTEND of MEM on WORD_REGISTER_OPERATIONS targets [PR113010]

2024-01-16 Thread Greg McGary
The sign bit of a sign-extending load cannot be known until runtime, so don't attempt to simplify it in the combiner. 2024-01-11 Greg McGary PR rtl-optimization/113010 * combine.cc (expand_compound_operation): Don't simplify SIGN_EXTEND of a MEM