* gcc.target/powerpc/builtins-1-be.c <vclzb>: Rename duplicate test
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / cmpb32-1.c
blob6338ccf0cb34aeb6e877f7261df70aacf7695bf3
1 /* { dg-do run { target { powerpc*-*-* } } } */
2 /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power6" } } */
3 /* { dg-require-effective-target dfp_hw } */
4 /* { dg-options "-mcpu=power6" } */
6 void abort ();
8 unsigned int
9 do_compare (unsigned int a, unsigned int b)
11 return __builtin_cmpb (a, b);
14 void
15 expect (unsigned int pattern, unsigned int value)
17 if (pattern != value)
18 abort ();
21 int
22 main (int argc, char *argv[])
24 expect (0xff000000, do_compare (0x12345678, 0x12000000));
25 expect (0x00ffffff, do_compare (0x12345678, 0x00345678));
26 expect (0x000000ff, do_compare (0x00000078, 0x12345678));