This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][ARM] Remove Thumb-2 iordi_not patterns
- From: Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>
- To: Kyrill Tkachov <kyrylo dot tkachov at foss dot arm dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: nd <nd at arm dot com>, Richard Earnshaw <Richard dot Earnshaw at arm dot com>
- Date: Mon, 4 Sep 2017 17:07:06 +0000
- Subject: Re: [PATCH][ARM] Remove Thumb-2 iordi_not patterns
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Wilco dot Dijkstra at arm dot com;
- Nodisclaimer: True
- References: <AM5PR0802MB2610DE3C18DF721DDC683376837C0@AM5PR0802MB2610.eurprd08.prod.outlook.com>,<AM5PR0802MB2610B76853C756967EDB8983831B0@AM5PR0802MB2610.eurprd08.prod.outlook.com>,<VI1PR0802MB262186A584318BD30106F7DE83C20@VI1PR0802MB2621.eurprd08.prod.outlook.com> <AM5PR0802MB26108F8651F610246862D09083DC0@AM5PR0802MB2610.eurprd08.prod.outlook.com>,<59AD828C.4060801@foss.arm.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
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.
Note that the SI mode instructions have zero/sign extend optimized after
being split from DI mode using existing patterns.
Wilco