[ARM] Use UBFX for some and-immediate operations

Submitted by Richard Earnshaw on Aug. 4, 2012, 2:03 p.m.

Details

Message ID 501D2BBE.3040307@arm.com
State New
Headers show

Commit Message

Richard Earnshaw Aug. 4, 2012, 2:03 p.m.
On 03/08/12 19:10, Richard Henderson wrote:
> On 2012-08-02 09:24, Richard Earnshaw wrote:
>> +	    /* Extz only supports SImode, but we can coerce the operands
>> +	       into that mode.  */
>> +	    emit_constant_insn (cond,
>> +				gen_extzv_t2 (gen_lowpart (mode, target),
>> +					      gen_lowpart (mode, source),
>> +					      GEN_INT (i), const0_rtx));
> 
> Didn't you mean gen_lowpart (SImode, ...) ?
> 
> 
> r~
> 

Urm, yes.  Well spotted.

Fixed thusly:

2012-08-04  Richard Earnshaw  <rearnsha@arm.com>

	* arm.c (arm_gen_constant): Use SImode when preparing operands for
	gen_extzv_t2.

Patch hide | download patch | download mbox

--- arm.c	(revision 190143)
+++ arm.c	(local)
@@ -2999,8 +2999,8 @@  arm_gen_constant (enum rtx_code code, en
 	    /* Extz only supports SImode, but we can coerce the operands
 	       into that mode.  */
 	    emit_constant_insn (cond,
-				gen_extzv_t2 (gen_lowpart (mode, target),
-					      gen_lowpart (mode, source),
+				gen_extzv_t2 (gen_lowpart (SImode, target),
+					      gen_lowpart (SImode, source),
 					      GEN_INT (i), const0_rtx));
 	}