kit

kit
git clone https://git.ryansepassi.com/git/kit.git
Log | Files | Refs | README

iunop_lognot_unsigned.c (233B)


      1 /* Logical not at 32-bit unsigned: !x on an unsigned operand. cmp + cset.
      2  * volatile defeats folding. !0u == 1, scaled to 42. */
      3 int test_main(void) {
      4   volatile unsigned a = 0u;
      5   int n = !a;    /* 1 */
      6   return n * 42; /* 42 */
      7 }