This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
The following patch teaches the middle-end how to fold/evaluate VIEW_CONVERT_EXPR of INTEGER_CST, REAL_CST, COMPLEX_CST and VECTOR_CST at compile-time. This type of binary reinterpretation can already be performed (for some of the above constant types) in the RTL optimizers, and this patch effectively duplicates the logic of simplify-rtx.c's simplify_immed_subreg in fold, but operating on trees.
+ + /* Subroutine of fold_view_convert_expr. Interpet the contents of
+ return NULL_TREE;
+ for (i = 0; i < bitsize; i += 8)
+ tmp[ibase / 32] |= (long) (*ptr++) << (i & 31);
+ static tree + fold_view_convert_expr (tree type, tree expr) + { + /* We support up to 512-bit values (for V8DFmode). */ + enum { + max_bitsize = 512 + }; + unsigned char buffer[max_bitsize / 8];
+ if (isize > max_bitsize)
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |