Re: the elimination of if blocks in GCC during if-conversion and vectorization

2023-10-23 Thread Hanke Zhang via Gcc
Hi Richard: Thanks for your advice. But when I try a simpler example like the one below before looking at the code, GCC still does nothing. int main() { int width; scanf("%d", &width); int sum = 0; for (int i = 0; i < width; i++) sum += i; printf("%d\n", sum); } I tried O3 an

Re: the elimination of if blocks in GCC during if-conversion and vectorization

2023-10-23 Thread Richard Biener via Gcc
On Mon, Oct 23, 2023 at 12:50 PM Hanke Zhang wrote: > > Hi Richard: > > Thanks for your advice. But when I try a simpler example like the one > below before looking at the code, GCC still does nothing. > > int main() { > int width; > scanf("%d", &width); > int sum = 0; > for (int i

Re: the elimination of if blocks in GCC during if-conversion and vectorization

2023-10-23 Thread Hanke Zhang via Gcc
Richard Biener 于2023年10月23日周一 20:32写道: > > On Mon, Oct 23, 2023 at 12:50 PM Hanke Zhang wrote: > > > > Hi Richard: > > > > Thanks for your advice. But when I try a simpler example like the one > > below before looking at the code, GCC still does nothing. > > > > int main() { > > int width; >

Riscv code generation

2023-10-23 Thread Jacob Navia via Gcc
Hi In a previous post I pointed to a strange code generation`by gcc in the riscv-64 targets. To resume: Suppose a 64 bit operation: c = a OP b; Gcc does the following: Instead of loading 64 bits from memory gcc loads 8 bytes into 8 separate registers for both operands. Then it ORs

Re: [PATCH v5 2/5] libcpp: add a function to determine UTF-8 validity of a C string

2023-10-23 Thread David Malcolm via Gcc
On Wed, Jan 25, 2023 at 4:09 PM Ben Boeckel via Gcc wrote: > > This simplifies the interface for other UTF-8 validity detections when a > simple "yes" or "no" answer is sufficient. > > libcpp/ > > * charset.cc: Add `_cpp_valid_utf8_str` which determines whether > a C string is vali

Re: [PATCH v5 2/5] libcpp: add a function to determine UTF-8 validity of a C string

2023-10-23 Thread Jason Merrill via Gcc
On 10/23/23 11:16, David Malcolm wrote: On Wed, Jan 25, 2023 at 4:09 PM Ben Boeckel via Gcc wrote: This simplifies the interface for other UTF-8 validity detections when a simple "yes" or "no" answer is sufficient. libcpp/ * charset.cc: Add `_cpp_valid_utf8_str` which determines whe

Re: [PATCH v5 2/5] libcpp: add a function to determine UTF-8 validity of a C string

2023-10-23 Thread David Malcolm via Gcc
On Mon, 2023-10-23 at 11:24 -0400, Jason Merrill wrote: > On 10/23/23 11:16, David Malcolm wrote: > > On Wed, Jan 25, 2023 at 4:09 PM Ben Boeckel via Gcc > > wrote: > > > > > > This simplifies the interface for other UTF-8 validity detections > > > when a > > > simple "yes" or "no" answer is suff

Inquiry about ARM gcc5 CVE-2023-4039 Patch

2023-10-23 Thread 老小孩老小孩 via Gcc
Dear arms, I hope this message finds you well. I am writing to inquire about the issue of ARM gcc5 CVE-2023-4039. According to the advisory on GitHub (https://github.com/metaredteam/external-disclosures/security/advisories/GHSA-x7ch-h5rf-w2mf), this bug affects versions from 5.4.0 to the tr