From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com [IPv6:2607:f8b0:4864:20::535]) by sourceware.org (Postfix) with ESMTPS id 5A3E73884578 for ; Fri, 14 Jun 2024 17:22:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5A3E73884578 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5A3E73884578 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::535 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718385740; cv=none; b=GOpseARghk4Hu7daBVYQjOAzIZpNoYF6iE2ecaBsDEFt4gdshJPY2ouTnvDU4Ci/DVsTGrGlFnJNUecDK35gCNv9hAhIBrjzbqME36jjYrmwb4gJf0svWUV+U1XvfYeCt2YvsRyDRPUCo0Z0aaw2y3ZO2VdtsOwoUWAvNbcAlwo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718385740; c=relaxed/simple; bh=tMJn1meBrlWCWZ6xSoG5dwmNqOxGH0hkOpDPmYmFGnw=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=m0wdlaKB32TPmsrQZtXxIr+hjCxS2lB6Xe2XmojvrpvJV+ONxq8OAqbNii2pP8h2npNkvdon41YcR4rRcdjgt/YmZYT/IEEFCf6n0fRqnjYDsbaBaA3U7dRRFofT63On5mHqi2aNGxEG9rFWX9ixZKTf4EOd6AYCHGjr40NoRQM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pg1-x535.google.com with SMTP id 41be03b00d2f7-6818eea9c3aso1937122a12.1 for ; Fri, 14 Jun 2024 10:22:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718385737; x=1718990537; darn=gcc.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Ar2RkMaBDiRXI2LBJxJ9iiKGU0IDui8CNfMCbG4vBUs=; b=Cq+BZdGKsGAIR+Db3cRlp7UMvrxILh6iYZGIc4fiRYgRM0WYvLf4pmE7GxSmYfxazA 9BpJt+o2c8IaFOr8v4YABKjLiEjIEjJjKKBSwvtlS4fxAwcbmKm6U0hJY6xUzkAYsXM7 3RAOo5GARPB4ZYjN22S6vwBPQvdKq3QZ/FPeUMT3leUJY8A6RitpdtqfEgT+ksym6btY xSiUQVBUQlGmubdEPidjd77++nv6VQ/YaouvWcRw0vWgkzEa91XQ4ksr4Hk7r3GGad9P pTMhSHl602wKjJwFg+7CNzbVLlmY71UuNLVGEnVUxUm19wALeGGCZrddap+tvndAcmmH ql3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718385737; x=1718990537; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Ar2RkMaBDiRXI2LBJxJ9iiKGU0IDui8CNfMCbG4vBUs=; b=rq9xGWGSBcNN/IbjHCZ+BgUn4ToY89gEVIgl4rbfH5NQOuqrVJ9e4gXZzzvnijYrgi O3Qv2XSQPlix7DSC6wdf0c7V9I/46XvWEfXm17OeiKc+HEwk1rg/cevr2BUnBabBKQfO Do1b/Aw4TOEYZQPj7vKa69SQyQQwqVMQlyjF2Qsk5/FMP+eWXKNBQZmsQowRSHT1b5He t26+t6qVWqwTcZb5kCdR0Fa1izoHn1jJlJY9R59xL37SwMtqge0D6YS/qVFoHNu1+/2/ ibnmCdbbxIoEsFRRqKb/Q5yxse5kRq4d0UVieHVQr9J0muVuz6IjdskesJPaEkAcpG4A oiZw== X-Gm-Message-State: AOJu0Yy6j/ULTSYFRLl919GorsSuh5iGkfDAGKWIVSzP9nODTUSkwiBi HAQHvsP6o7RyCqxZWAiKoiYkQtJiVx9O0hrmlPIlgq7xam+NycMv X-Google-Smtp-Source: AGHT+IGebUr8Q8nTDL5j0rlSG50eUxlrJpx/ah+hcY9Uas+nDfnta5HvUoJSb6REK/BILjN2vLOe6Q== X-Received: by 2002:a17:903:234f:b0:1f7:13a1:cba2 with SMTP id d9443c01a7336-1f8625d4e51mr35946615ad.3.1718385737121; Fri, 14 Jun 2024 10:22:17 -0700 (PDT) Received: from [172.31.0.109] ([136.36.72.243]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f855ee819bsm34670725ad.126.2024.06.14.10.22.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 14 Jun 2024 10:22:16 -0700 (PDT) Message-ID: <1d06e4aa-6e76-4e8a-b9bb-3ec6af05c779@gmail.com> Date: Fri, 14 Jun 2024 11:22:11 -0600 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta Subject: Re: [PATCH 0/3] [APX CFCMOV] Support APX CFCMOV Content-Language: en-US To: Alexander Monakov , "Kong, Lingling" Cc: "gcc-patches@gcc.gnu.org" , "Liu, Hongtao" , Uros Bizjak References: <20240614025749.743388-1-lingling.kong@intel.com> From: Jeff Law In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 6/14/24 11:10 AM, Alexander Monakov wrote: > > On Fri, 14 Jun 2024, Kong, Lingling wrote: > >> APX CFCMOV[1] feature implements conditionally faulting which means that all memory faults are suppressed >> when the condition code evaluates to false and load or store a memory operand. Now we could load or store a >> memory operand may trap or fault for conditional move. >> >> In middle-end, now we don't support a conditional move if we knew that a load >> from A or B could trap or fault. > > Predicated loads&stores on Itanium don't trap either. They are modeled via > COND_EXEC on RTL. The late if-conversion pass (the instance that runs after > reload) is capable of introducing them. > >> To enable CFCMOV, we add a target HOOK TARGET_HAVE_CONDITIONAL_MOVE_MEM_NOTRAP >> in if-conversion pass to allow convert to cmov. > > Considering the above, is the new hook really necessary? Can you model the new > instructions via (cond_exec () (set ...)) instead of (set (if_then_else ...)) ? Note that turning on cond_exec will turn off some of the cmove support. But the general suggesting of trying to avoid a hook for this is a good one. In fact, my first reaction to this thread was "do we really need a hook for this". jeff