From patchwork Fri Sep 11 21:18:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Sidwell X-Patchwork-Id: 1362693 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=acm.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=pucEtWoO; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Bp7ss0K6Tz9sSs for ; Sat, 12 Sep 2020 07:18:55 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D86D8398B437; Fri, 11 Sep 2020 21:18:51 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-qk1-x733.google.com (mail-qk1-x733.google.com [IPv6:2607:f8b0:4864:20::733]) by sourceware.org (Postfix) with ESMTPS id 70AB2398B432 for ; Fri, 11 Sep 2020 21:18:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 70AB2398B432 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=acm.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=nathanmsidwell@gmail.com Received: by mail-qk1-x733.google.com with SMTP id q5so11323271qkc.2 for ; Fri, 11 Sep 2020 14:18:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:to:from:subject:message-id:date:user-agent:mime-version :content-language; bh=m/Iik7K+djezVx3qLe5JCPS8l/2ublbeQ31r+pSxBws=; b=pucEtWoOPEf/RMSyn+rFtKyNVsBlBdifJRGvlAsM6tggMvBrxSBBrGrLI0iVbuAqaY hcAivxVIJrXchQkgJwHIvq0SkKm9DexcPkF5jHl4XcesJ4gi/dWsSXiIz8wpBkUGZ3f7 bTaPWATctzuMU4qvbITJam+aS1fkzEupEEQExaJ6aqOhifoQEI3i5clL3+86WMQFBwaE uR9pdSrXRNNzsGJzbubmPpqJ8rlf0GybcslotDlPtxaQxq7UjYT+7/XV+vev0ZLE7dPY HRzOsCg5MKngBCefXJqVxs4ePcyXcKDuQLTuVD6b2lNeFeSDmk0s2Ntn00Mi10VPf4nJ RFMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:to:from:subject:message-id:date :user-agent:mime-version:content-language; bh=m/Iik7K+djezVx3qLe5JCPS8l/2ublbeQ31r+pSxBws=; b=GEGzcu03oxG2V3y+cy+ws3JkI0UXnUpoVk7FCFWS1X/RxXJLdQsxUhXd3PLuWkwhx7 31h/kjfuNmNAFOt9RmAd3jXnj86a536i6sTfS0v+FyvdNwLswCfrGyJyQJs2Rx1Y5/+G 9Ruloyc9u0aQBUMz5P2twXapnaiPpRvMXwhftEbw/gasuXKmnPxI/2b0fJXO/g+EBDYK MdiWculLFzv08nVlhkSt8f13Zv1QbI9yA5nPPGZJG+dYqa63qjSJKQcTQr0u/WA+S6FZ GD7EREMXFIxuh3RwaTqZb+meQRNsvxzVXlIh0aiNAj8xvx4hB+VVuQs+WGnnnczWYl0k 5dvg== X-Gm-Message-State: AOAM5339PA7r9UO0+E6LdmPuHSvCwa/TKyQ+eurG/P/d6ds5G4amtY31 fe1aVKLArhvmfmzVNdR8Zvk= X-Google-Smtp-Source: ABdhPJwSeMLBTSogklRytP0N9xh9QT27XodEtBSwIWJ3+ApnpHLyfpAaUJO3klRtj0AwB9Z4Cnbq9w== X-Received: by 2002:ae9:e70b:: with SMTP id m11mr3347756qka.210.1599859129686; Fri, 11 Sep 2020 14:18:49 -0700 (PDT) Received: from ?IPv6:2620:10d:c0a8:1102:f526:facd:40a1:322d? ([2620:10d:c091:480::1:2df1]) by smtp.googlemail.com with ESMTPSA id l12sm972936qkg.54.2020.09.11.14.18.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 11 Sep 2020 14:18:48 -0700 (PDT) To: GCC Patches From: Nathan Sidwell Subject: i386: Fix array index in expander Message-ID: Date: Fri, 11 Sep 2020 17:18:48 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 Content-Language: en-US X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" I noticed a compiler warning about out-of-bound access. Fixed thusly. gcc/ * config/i386/sse.md (mov): Fix operand indices. pushed as obvious diff --git i/gcc/config/i386/sse.md w/gcc/config/i386/sse.md index a728b979f01..a784346a23b 100644 --- i/gcc/config/i386/sse.md +++ w/gcc/config/i386/sse.md @@ -23491,7 +23491,7 @@ (define_expand "mov" (match_operand:MASK_DWI 1 "nonimmediate_operand"))] "TARGET_AVX512VP2INTERSECT" { - if (MEM_P (operands[1]) && MEM_P (operands[2])) + if (MEM_P (operands[0]) && MEM_P (operands[1])) operands[1] = force_reg (mode, operands[1]); })