Bug 92818 - Typo in vec_perm -> bit_insert pattern
Summary: Typo in vec_perm -> bit_insert pattern
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 10.0
: P3 normal
Target Milestone: ---
Assignee: Richard Biener
URL:
Keywords: missed-optimization, wrong-code
Depends on:
Blocks:
 
Reported: 2019-12-05 11:08 UTC by Richard Biener
Modified: 2019-12-05 13:08 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2019-12-05 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Biener 2019-12-05 11:08:04 UTC
Index: gcc/match.pd
===================================================================
--- gcc/match.pd        (revision 278992)
+++ gcc/match.pd        (working copy)
@@ -6049,7 +6049,7 @@ (define_operator_list COND_TERNARY
                    break;
                if (at < encoded_nelts && sel.series_p (at + 1, 1, at + 1, 1))
                  {
-                   if (known_lt (at, nelts))
+                   if (known_lt (poly_uint64 (sel[at]), nelts))
                      ins = fold_read_from_vector (cop0, sel[at]);
                    else
                      ins = fold_read_from_vector (cop1, sel[at] - nelts);
Comment 1 Richard Biener 2019-12-05 11:08:30 UTC
Mine.
Comment 2 Richard Biener 2019-12-05 13:03:33 UTC
Author: rguenth
Date: Thu Dec  5 13:02:57 2019
New Revision: 278998

URL: https://gcc.gnu.org/viewcvs?rev=278998&root=gcc&view=rev
Log:
2019-12-05  Richard Biener  <rguenther@suse.de>

	PR middle-end/92818
	* tree-ssa-forwprop.c (simplify_vector_constructor): Improve
	heuristics on what don't care element to choose.
	* match.pd (VEC_PERM_EXPR -> BIT_INSERT_EXPR): Fix typo.

	* gcc.target/i386/pr92818.c: New testcase.

Added:
    trunk/gcc/testsuite/gcc.target/i386/pr92818.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/match.pd
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-ssa-forwprop.c
Comment 3 Richard Biener 2019-12-05 13:08:03 UTC
Fixed.