From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Torvalds Subject: Re: LLVM and PSEUDO_REG/PSEUDO_PHI Date: Mon, 29 Aug 2011 13:32:33 -0700 Message-ID: References: <4E5495C9.6050207@kernel.org> <4E55F33C.50203@kernel.org> <4E573A3E.6060104@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from smtp1.linux-foundation.org ([140.211.169.13]:40011 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754954Ab1H2UdZ (ORCPT ); Mon, 29 Aug 2011 16:33:25 -0400 Received: from mail-ww0-f42.google.com (mail-ww0-f42.google.com [74.125.82.42]) (authenticated bits=0) by smtp1.linux-foundation.org (8.14.2/8.13.5/Debian-3ubuntu1.1) with ESMTP id p7TKWsoP019834 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=FAIL) for ; Mon, 29 Aug 2011 13:32:55 -0700 Received: by wwe5 with SMTP id 5so2789325wwe.1 for ; Mon, 29 Aug 2011 13:32:53 -0700 (PDT) In-Reply-To: Sender: linux-sparse-owner@vger.kernel.org List-Id: linux-sparse@vger.kernel.org To: Pekka Enberg Cc: Jeff Garzik , linux-sparse@vger.kernel.org On Mon, Aug 29, 2011 at 12:45 PM, Pekka Enberg wrote: > > However, i'm not 100% sure that's sufficient. Is OP_CAST always zero-extend > or do we need to check for something specific here? OP_CAST is always a zero-extend, OP_SCAST is a sign-extending one. (Of course, they may be *truncating* casts too, which don't need to generate any code on most architectures). OP_PTRCAST should act as OP_CAST. NOTE! The casting is dubious. We only have a single OP_FPCAST, for example, and that's just broken. Right now "OP_FPCAST" means that the *source* was a FP value. But if we cast *to* a FP value, it ends up showing up as OP_[S]CAST, which is just bogus. The FPCAST should be for any FP operation (to or from or both), and then the FPCAST logic would have to decide how it handles it. The FP support in general is pretty weak. The kernel doesn't do FP, I never really cared about it. Linus