This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH, rs6000] Canonicalize split for ordered and unordered vector compares
- From: Bill Schmidt <wschmidt at linux dot vnet dot ibm dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 24 Feb 2014 18:41:40 -0600
- Subject: [PATCH, rs6000] Canonicalize split for ordered and unordered vector compares
- Authentication-results: sourceware.org; auth=none
Hi,
The patterns *vector_ordered<mode> and *vector_unordered<mode> perform a
split that's intended to match the nor<mode>3 pattern. However, they
don't use the proper canonical form, so the resulting insn isn't
recognized. This patch changes the splits to use the canonical form.
Bootstrapped and tested on powerpc64{,le}-unknown-linux-gnu with no
regressions. Is this ok for trunk?
Thanks,
Bill
2014-02-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* config/rs6000/vector.md (*vector_ordered<mode>): Change split to
use canonical form for nor<mode>3.
(*vector_unordered<mode>): Likewise.
Index: gcc/config/rs6000/vector.md
===================================================================
--- gcc/config/rs6000/vector.md (revision 208062)
+++ gcc/config/rs6000/vector.md (working copy)
@@ -586,8 +586,8 @@
(ge:VEC_F (match_dup 2)
(match_dup 1)))
(set (match_dup 0)
- (ior:VEC_F (match_dup 3)
- (match_dup 4)))]
+ (and:VEC_F (not:VEC_F (match_dup 3))
+ (not:VEC_F (match_dup 4))))]
"
{
operands[3] = gen_reg_rtx (<MODE>mode);
@@ -608,8 +608,8 @@
(ge:VEC_F (match_dup 2)
(match_dup 1)))
(set (match_dup 0)
- (not:VEC_F (ior:VEC_F (match_dup 3)
- (match_dup 4))))]
+ (and:VEC_F (not:VEC_F (match_dup 3))
+ (not:VEC_F (match_dup 4))))]
"
{
operands[3] = gen_reg_rtx (<MODE>mode);