From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from fencepost.gnu.org (fencepost.gnu.org [IPv6:2001:470:142:3::e]) by sourceware.org (Postfix) with ESMTPS id C8D4F3856DC4 for ; Wed, 25 May 2022 18:58:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C8D4F3856DC4 Received: from eggs.gnu.org ([2001:470:142:3::10]:36002) by fencepost.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ntwD7-0008HH-Ay for gcc-help@gnu.org; Wed, 25 May 2022 14:58:21 -0400 Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]:40520) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ntwD5-0007fD-NF for gcc-help@gnu.org; Wed, 25 May 2022 14:58:21 -0400 Received: by mail-ej1-x634.google.com with SMTP id wh22so43346461ejb.7 for ; Wed, 25 May 2022 11:58:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=MMpPNkU8P4KvcYzBe7V49m1u5ZpDz98keBAHnifTpzg=; b=Wq0neZGpJQ0FupIER1YYdt8LxvnBrrKdhKuVKhlmwhf2wknZwfQ44QvgG19rjmRWBR SIBlTc0y1WtOOh+cPcgccGbJfBFZW00CIZ+2N5ufflEJL50xIMj9W7U9TWgem3XY8wxZ TkuQeQkf6bs1AYT2MMkFNHizQvSODEqyphc3B/fZnCWZ/MFW80Up4B+3SFmqBcpok+qe qb9P9a2Xq9Yu4GKOsWPT128IJCB5FD74nolAQnd0SI24rtMdh7Arx2G/EihBbY7QDUwX umJXesQHKKdldMgBB8/duxTQxuyyNOZD/RI7ZlKhhahi7pcPAtJm6u8nuh8YO1gjll6S jCuw== X-Gm-Message-State: AOAM533AlKi3Dt+oswvnINQIywo5TrrcxcjkTHjfHgAqKmCZwonMLX9+ +RktKSwuvObK96rvEWHRX1H0HXR4cq4mg4s5LVfulxGP5pY= X-Google-Smtp-Source: ABdhPJx9bO0WfvJ2KW19Fh8xN2I08I4wm/vnXgeoYPdP3rot80k8cWKKI3nQWoHHGQWVHtsjCSLt/DIzfjL99YznCUM= X-Received: by 2002:a17:907:d8b:b0:6f4:99e5:78f with SMTP id go11-20020a1709070d8b00b006f499e5078fmr30000918ejc.37.1653505097288; Wed, 25 May 2022 11:58:17 -0700 (PDT) MIME-Version: 1.0 From: Tom Kacvinsky Date: Wed, 25 May 2022 14:58:06 -0400 Message-ID: Subject: -march=x86_64 -mtune=generic question To: gcc-help@gnu.org Received-SPF: pass client-ip=2a00:1450:4864:20::634; envelope-from=tkacvins@gmail.com; helo=mail-ej1-x634.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, HTML_MESSAGE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2022 18:58:23 -0000 Perhaps this is a question for the gcc development list, but I thought I'd try here first. I am trying to figure out why GCC 12.1 generated object code is executing a hair slower than GCC 8.3.0 generated object code. I did run gcc with -fverbose-asm and -S, examined the assembly, and saw that -march=x86_64 -mtune=generic was used for compilation options. Reading the documentation. I see that -mtune=generic can change from GCC release to release based on the most prevalent processors in use at the time. I did poke around at the gcc source code and (gcc/config/i386/*) to see if I could figure out what changed from release to release and admit defeat. Does anyone have a quick rundown on what would have changed between GCC 8.3.0 and 12.1.0 in terms of what -mtune=generic does for optimizations? Thanks, Tom