https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109702
Bug ID: 109702 Summary: [14 Regression] Wrong code with if and __builtin_bswap and others Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords: wrong-code Severity: critical Priority: P3 Component: tree-optimization Assignee: pinskia at gcc dot gnu.org Reporter: pinskia at gcc dot gnu.org Target Milestone: --- I totally messed up the match.pd patterns such that we start to transform: ``` unsigned f(unsigned t, unsigned t1) { if (t != 0) return __builtin_bswap32(t1); return 0; } ``` To just `return __builtin_bswap32(t1)` . I only noticed this after the review of the patch for CLRSB (https://gcc.gnu.org/pipermail/gcc-patches/2023-May/617228.html ) but the review didn't fully notice how it was incorrect; just noticed there was an unused capture.