[Bug lto/116946] New: LTO gets confused about code path and incorrectly triggers build-time assertion

2024-10-02 Thread jwerner at chromium dot org via Gcc-bugs
Severity: normal Priority: P3 Component: lto Assignee: unassigned at gcc dot gnu.org Reporter: jwerner at chromium dot org Target Milestone: --- We're using `__builtin_constant_p()` in combination with generating a function call to an undefined reference

[Bug target/112573] Suboptimal code generation with `-fdata-sections` on aarch64

2023-11-16 Thread jwerner at chromium dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112573 --- Comment #2 from Julius Werner --- Sorry, I don't really know what reassociation means in this context. Are you saying that the behavior is WAI? Note that the problem also exists when you write the accesses in h() as: *(a + (y + 3))

[Bug c/112573] New: Suboptimal code generation with `-fdata-sections` on aarch64

2023-11-16 Thread jwerner at chromium dot org via Gcc-bugs
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: jwerner at chromium dot org Target Milestone: --- Target: aarch64 I noticed some weird code generation behavior in aarch64 that seems to be a new regression in GCC 13 or 12

[Bug middle-end/99578] [11/12 Regression] gcc-11 -Warray-bounds or -Wstringop-overread warning when accessing a pointer from integer literal

2022-03-16 Thread jwerner at chromium dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99578 Julius Werner changed: What|Removed |Added CC||jwerner at chromium dot org --- Comment

[Bug c/97434] New: Missed dead code optimization from data flow analysis

2020-10-14 Thread jwerner at chromium dot org via Gcc-bugs
Component: c Assignee: unassigned at gcc dot gnu.org Reporter: jwerner at chromium dot org Target Milestone: --- I found a pretty simple case where GCC cannot optimize out a redundant check. I've reduced it to the following minimal test case: unsigned int random_number

[Bug tree-optimization/92903] Cannot elide byteswap when only needed to compare to multiple constants

2019-12-10 Thread jwerner at chromium dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92903 --- Comment #1 from Julius Werner --- For reference, clang 10.0.0 manages to do this optimization correctly: (File Offset: 0x40): 0: b8 01 00 00 00 mov$0x1,%eax 5: 81 ff 23 45 67 89 cmp$0x896745

[Bug c/92903] New: Cannot elide byteswap when only needed to compare to multiple constants

2019-12-10 Thread jwerner at chromium dot org
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: jwerner at chromium dot org Target Milestone: --- I compiled the following test code on GCC 8.3.0: int test(int a

[Bug c/92716] -Os doesn't inline byteswap function even though it's a single instruction

2019-11-28 Thread jwerner at chromium dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92716 --- Comment #1 from Julius Werner --- edit: Just noticed that when I implement it as static inline unsigned int byteswap(unsigned int x) {

[Bug c/92716] New: -Os doesn't inline byteswap function even though it's a single instruction

2019-11-28 Thread jwerner at chromium dot org
Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: jwerner at chromium dot org Target Milestone: --- I compiled the following test code for both x86_64 and aarch64 on gcc 8.3.0: static inline unsigned int byteswap(unsi

[Bug c/89408] New: No constant folding when dereferencing string literals

2019-02-19 Thread jwerner at chromium dot org
Component: c Assignee: unassigned at gcc dot gnu.org Reporter: jwerner at chromium dot org Target Milestone: --- See the following minimal test case: int main(int argc, char **argv) { switch (argc) { case "C"[0]: return 1;

[Bug c/88437] New: Excessive struct alignment on x86_64

2018-12-10 Thread jwerner at chromium dot org
Assignee: unassigned at gcc dot gnu.org Reporter: jwerner at chromium dot org Target Milestone: --- Compile the following test file for the x86_64 target: struct { void *a; void *b; } mystruct __attribute__((__section__(".data.mystruct")); Then run objdump -x on the o

[Bug target/67701] Unnecessary/bad instructions for u32-casted access to external symbol (assumes misaligned, superfluous load)

2015-09-23 Thread jwerner at chromium dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67701 --- Comment #3 from Julius Werner --- > I suspect this is an armv7 issue only where there is missing support for > misaligned load/stores. Did a quick test on aarch64 and you're right, neither of the two issues appears there. > Also testvalue

[Bug c/67701] Unnecessary/bad instructions for u32-casted access to external symbol (assumes misaligned, superfluous load)

2015-09-23 Thread jwerner at chromium dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67701 Julius Werner changed: What|Removed |Added Target||armv7a --- Comment #1 from Julius Werner

[Bug c/67701] New: Unnecessary/bad instructions for u32-casted access to external symbol (assumes misaligned, superfluous load)

2015-09-23 Thread jwerner at chromium dot org
: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: jwerner at chromium dot org Target Milestone: --- Consider the following sample program: static inline void write32(void *addr, unsigned int