1 /* { dg-do compile { target { powerpc64-*-* } } } */
2 /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
3 /* { dg-options "-mcpu=power8 -O0 -mno-fold-gimple -dp" } */
4 /* { dg-prune-output "gimple folding of rs6000 builtins has been disabled." } */
6 /* Test that a number of newly added builtin overloads are accepted
9 /* Expected results for Big Endian:
21 vec_cntlz vclzd, vclzb, vclzw, vclzh
24 vec_cts xvcvdpsxds, vctsxs
25 vec_ctu xvcvdpuxds, vctuxs
26 vec_div divd, divdu | __divdi3(), __udivdi3()
27 vec_mergel vmrghb, vmrghh, xxmrghw
28 vec_mergeh xxmrglw, vmrglh
29 vec_mul mulld | mullw, mulhwu
38 vec_rsqrte xvrsqrtesp */
40 /* { dg-final { scan-assembler-times {\mvcmpequd\M\.} 4 } } */
41 /* { dg-final { scan-assembler-times {\mvcmpgtud\M\.} 8 } } */
42 /* { dg-final { scan-assembler-times {\mxxland\M} 16 } } */
43 /* { dg-final { scan-assembler-times {\mxxlandc\M} 13 } } */
44 /* { dg-final { scan-assembler-times {\mvclzb\M} 2 } } */
45 /* { dg-final { scan-assembler-times {\mvclzd\M} 2 } } */
46 /* { dg-final { scan-assembler-times {\mvclzw\M} 2 } } */
47 /* { dg-final { scan-assembler-times {\mvclzh\M} 2 } } */
48 /* { dg-final { scan-assembler-times {\mxvcpsgnsp\M} 1 } } */
49 /* { dg-final { scan-assembler-times {\mxvmuldp\M} 6 } } */
50 /* { dg-final { scan-assembler-times {\mxvcvdpsxds\M} 1 } } */
51 /* { dg-final { scan-assembler-times {\mvctsxs\M} 1 } } */
52 /* { dg-final { scan-assembler-times {\mxvcvdpuxds\M} 1 } } */
53 /* { dg-final { scan-assembler-times {\mvctuxs\M} 1 } } */
54 /* { dg-final { scan-assembler-times {\mvmrghb\M} 0 } } */
55 /* { dg-final { scan-assembler-times {\mvmrghh\M} 3 } } */
56 /* { dg-final { scan-assembler-times {\mxxmrghw\M} 1 } } */
57 /* { dg-final { scan-assembler-times {\mxxmrglw\M} 4 } } */
58 /* { dg-final { scan-assembler-times {\mvmrglh\M} 4 } } */
59 /* { dg-final { scan-assembler-times {\mxxlnor\M} 6 } } */
60 /* { dg-final { scan-assembler-times {(?n)\mxxlor\M.*\mboolv4si3_internal\M} 6 } } */
61 /* { dg-final { scan-assembler-times {\mvpksdus\M} 1 } } */
62 /* { dg-final { scan-assembler-times {\mvperm\M} 2 } } */
63 /* { dg-final { scan-assembler-times {\mxvrdpi\M} 1 } } */
64 /* { dg-final { scan-assembler-times {\mxxsel\M} 6 } } */
65 /* { dg-final { scan-assembler-times {\mxxlxor\M} 6 } } */
66 /* { dg-final { scan-assembler-times {\mdivd\M} 2 { target lp64 } } } */
67 /* { dg-final { scan-assembler-times {\mdivdu\M} 2 { target lp64 } } } */
68 /* { dg-final { scan-assembler-times {\mmulld\M} 4 { target lp64 } } } */
69 /* { dg-final { scan-assembler-times {\mbl __divdi3\M} 2 { target ilp32 } } } */
70 /* { dg-final { scan-assembler-times {\mbl __udivdi3\M} 2 { target ilp32 } } } */
71 /* { dg-final { scan-assembler-times {\mmullw\M} 12 { target ilp32 } } } */
72 /* { dg-final { scan-assembler-times {\mmulhwu\M} 4 { target ilp32 } } } */
74 /* The source code for the test is in builtins-1.h. */
75 #include "builtins-1.h"