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] |
This patch adds reg_truncated_to_mode to rtl_hooks. With this we can now turn TRUNCATEs into SUBREGs in simplify_unary_operation_1. The patch is similar to the respective part of Paolo Bonzini's patch from http://gcc.gnu.org/ml/gcc-patches/2006-02/msg00684.html.
With these changes we remove seven truncations in gcc.c-torture/execute. They all seem to have been unnecessary.
+ /* Suppose that truncation from the machine mode of X to MODE is not a
+ no-op. See if there is anything special about X so that we can
+ assume it already contains a truncated value of MODE. */
+ + bool
+ truncated_to_mode (enum machine_mode mode, rtx x)
+ {
+ return REG_P (x) && rtl_hooks.reg_truncated_to_mode (mode, x);
+ }
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |