1  /* PR target/92140 */
       2  /* { dg-do compile { target nonpic } } */
       3  /* { dg-options "-O2 -mtune=generic -masm=att" } */
       4  /* { dg-additional-options "-mregparm=1" { target ia32 } } */
       5  /* { dg-final { scan-assembler-times "\tsbbl\t\\\$-1, v" 1 } } */
       6  /* { dg-final { scan-assembler-times "\tadcl\t\\\$-1, v" 1 } } */
       7  /* { dg-final { scan-assembler-times "\tadcl\t\\\$0, v" 1 } } */
       8  /* { dg-final { scan-assembler-times "\tsbbl\t\\\$0, v" 1 } } */
       9  /* { dg-final { scan-assembler-times "\tsbbl\t\\\$25, v" 1 } } */
      10  /* { dg-final { scan-assembler-times "\tadcl\t\\\$25, v" 1 } } */
      11  /* { dg-final { scan-assembler-times "\tadcl\t\\\$-26, v" 1 } } */
      12  /* { dg-final { scan-assembler-times "\tsbbl\t\\\$-26, v" 1 } } */
      13  /* { dg-final { scan-assembler-times "\tsbbl\t\\\$-43, v" 1 } } */
      14  /* { dg-final { scan-assembler-times "\tadcl\t\\\$-43, v" 1 } } */
      15  /* { dg-final { scan-assembler-times "\tadcl\t\\\$42, v" 1 } } */
      16  /* { dg-final { scan-assembler-times "\tsbbl\t\\\$42, v" 1 } } */
      17  /* { dg-final { scan-assembler-times "\tadcl\t%\[a-z0-9]*, v" 1 } } */
      18  /* { dg-final { scan-assembler-times "\tsbbl\t%\[a-z0-9]*, v" 1 } } */
      19  /* { dg-final { scan-assembler-times "\tsbbl\t\\\$-1, %" 1 } } */
      20  
      21  char c;
      22  int v;
      23  
      24  __attribute__((noipa)) void f1 (void) { v += c != 0; }
      25  __attribute__((noipa)) void f2 (void) { v -= c != 0; }
      26  __attribute__((noipa)) void f3 (void) { v += c == 0; }
      27  __attribute__((noipa)) void f4 (void) { v -= c == 0; }
      28  __attribute__((noipa)) void f5 (void) { v += (c != 0) - 26; }
      29  __attribute__((noipa)) void f6 (void) { v -= (c != 0) - 26; }
      30  __attribute__((noipa)) void f7 (void) { v += (c == 0) - 26; }
      31  __attribute__((noipa)) void f8 (void) { v -= (c == 0) - 26; }
      32  __attribute__((noipa)) void f9 (void) { v += (c != 0) + 42; }
      33  __attribute__((noipa)) void f10 (void) { v -= (c != 0) + 42; }
      34  __attribute__((noipa)) void f11 (void) { v += (c == 0) + 42; }
      35  __attribute__((noipa)) void f12 (void) { v -= (c == 0) + 42; }
      36  __attribute__((noipa)) void f13 (int z) { v += (c == 0) + z; }
      37  __attribute__((noipa)) void f14 (int z) { v -= (c == 0) + z; }
      38  __attribute__((noipa)) unsigned int f15 (unsigned int n) { return n ? 2 : 1; }