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]

Re: RFA: Fix modes in ctz libcall notes


Richard Sandiford wrote:
Paolo Bonzini <bonzini@gnu.org> writes:
-      emit_libcall_block (insns, target, value,
-			  gen_rtx_fmt_e (unoptab->code, outmode, op0));
+      eq_value = gen_rtx_fmt_e (unoptab->code, mode, op0);
+      if (GET_MODE_SIZE (outmode) < GET_MODE_SIZE (mode))
+	eq_value = gen_rtx_TRUNCATE (outmode, eq_value);
Why not simplifying this so that a SUBREG is created instead?

Having SUBREGs of anything other than MEMs and REGs seems less than ideal. (For reference, we use TRUNCATEs for a similar purpose when doing high-part multiplications.)

My thought was that fwprop or CSE will probably create it anyway (because they simplify) and I just wondered whether having a more canonical representation would be better. However, you're right that the more canonical representation may be less ideal.


Paolo


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]