aboutsummaryrefslogtreecommitdiff
path: root/gcc/c
diff options
context:
space:
mode:
authorCarl Love <cel@linux.ibm.com>2024-07-09 13:32:28 -0400
committerCarl Love <cel@linux.ibm.com>2024-07-09 13:43:00 -0400
commite611189899bb885a27ef8d17f77c02ada6c69069 (patch)
tree89371f0e56a1629d0c2e84c9577ed31e0641a3af /gcc/c
parent5db91b3073895700380ae34c63b103a33fa635a6 (diff)
downloadgcc-e611189899bb885a27ef8d17f77c02ada6c69069.zip
gcc-e611189899bb885a27ef8d17f77c02ada6c69069.tar.gz
gcc-e611189899bb885a27ef8d17f77c02ada6c69069.tar.bz2
rs6000, remove vector set and vector init built-ins.
The vector init built-ins: __builtin_vec_init_v16qi, __builtin_vec_init_v8hi, __builtin_vec_init_v4si, __builtin_vec_init_v4sf, __builtin_vec_init_v2di, __builtin_vec_init_v2df, __builtin_vec_init_v1ti perform the same operation as initializing the vector in C code. For example: result_v4si = __builtin_vec_init_v4si (1, 2, 3, 4); result_v4si = {1, 2, 3, 4}; These two constructs were tested and verified they generate identical assembly instructions with no optimization and -O3 optimization. The vector set built-ins: __builtin_vec_set_v16qi, __builtin_vec_set_v8hi. __builtin_vec_set_v4si, __builtin_vec_set_v4sf, __builtin_vec_set_v1ti, __builtin_vec_set_v2di, __builtin_vec_set_v2df perform the same operation as setting a specific element in the vector in C code. For example: src_v4si = __builtin_vec_set_v4si (src_v4si, int_val, index); src_v4si[index] = int_val; The built-in actually generates more instructions than the inline C code with no optimization but is identical with -O3 optimizations. All of the above built-ins that are removed do not have test cases and are not documented. Built-ins __builtin_vec_set_v1ti __builtin_vec_set_v2di, __builtin_vec_set_v2df are not removed as they are used in function resolve_vec_insert() in file rs6000-c.cc. The built-ins are removed as they don't provide any benefit over just using C code. The code to define the bif_init_bit, bif_is_init, as well as their uses are removed. The function altivec_expand_vec_init_builtin is also removed. gcc/ChangeLog: * config/rs6000/rs6000-builtin.cc (altivec_expand_vec_init_builtin): Remove the function. (rs6000_expand_builtin): Remove the if bif_is_int check to call the altivec_expand_vec_init_builtin function. * config/rs6000/rs6000-builtins.def: Remove the attribute string comment for init. (__builtin_vec_init_v16qi, __builtin_vec_init_v4sf, __builtin_vec_init_v4si, __builtin_vec_init_v8hi, __builtin_vec_init_v1ti, __builtin_vec_init_v2df, __builtin_vec_init_v2di, __builtin_vec_set_v16qi, __builtin_vec_set_v4sf, __builtin_vec_set_v4si, __builtin_vec_set_v8hi): Remove built-in definitions. * config/rs6000/rs6000-gen-builtins.cc: Remove comment for init attribute string. (struct attrinfo): Remove isinit entry. (parse_bif_attrs): Remove the if statement to check for attribute init. (ifdef DEBUG): Remove print for init attribute string. (write_decls): Remove print for define bif_init_bit and define for bif_is_init. (write_bif_static_init): Remove if bifp->attrs.isinit statement.
Diffstat (limited to 'gcc/c')
0 files changed, 0 insertions, 0 deletions