On 04/09/17 18:07, Wilco Dijkstra wrote:
Kyrill Tkachov wrote:
-(define_insn_and_split "*iordi_notsesidi_di"
- [(set (match_operand:DI 0 "s_register_operand" "=&r,&r")
- (ior:DI (not:DI (sign_extend:DI
- (match_operand:SI 2 "s_register_operand" "r,r")))
- (match_operand:DI 1 "s_register_operand" "0,r")))]
- "TARGET_THUMB2"
- "#"
- "TARGET_THUMB2 && reload_completed"
- [(set (match_dup 0) (ior:SI (not:SI (match_dup 2)) (match_dup 1)))
- (set (match_dup 3) (ior:SI (not:SI
- (ashiftrt:SI (match_dup 2) (const_int
31)))
- (match_dup 4)))]
- "
- {
- operands[3] = gen_highpart (SImode, operands[0]);
- operands[0] = gen_lowpart (SImode, operands[0]);
- operands[4] = gen_highpart (SImode, operands[1]);
- operands[1] = gen_lowpart (SImode, operands[1]);
- }"
- [(set_attr "length" "8")
- (set_attr "predicable" "yes")
- (set_attr "predicable_short_it" "no")
- (set_attr "type" "multiple")]
-)
-
... but why can we delete all these? As far as I can see they still
perform useful
splitting and don't have a NEON-specific pattern.
Am I missing something?
After Bernd's change almost all DI mode instructions are split before register
allocation. So instructions using DI mode no longer exist and thus these
extend variants can never be matched and are thus redundant.
Bernd's patch splits them when we don't have NEON. When NEON is
available though
they still maintain the DImode so we'd still benefit from these
transformations, no?
Kyrill
Note that the SI mode instructions have zero/sign extend optimized after
being split from DI mode using existing patterns.
Wilco