Here is an example:

#include <stdint.h>
uint64_t f(uint64_t a, uint64_t b) {
  a = a & 0xffffffff;
  return a;
}


在 2025/11/10 下午6:10, Xi Ruoyao 写道:
On Mon, 2025-11-10 at 17:52 +0800, mengqinggang wrote:
"uint64_t a & 0xffffffff" expands to two and:SI with -O0:

(insn 8 7 9 (set (subreg:SI (reg:DI 82 [ a_2 ]) 0)
          (and:SI (reg:SI 83)
              (const_int -1 [0xffffffffffffffff]))) "t.c":3:5 -1
IMO this insn is bogus in the first place.  It should be just (set ...
(reg:SI 83)) instead.  Maybe caused by a bug I created
unintentionally...

Could you figure out which code path generated this insn?


Reply via email to