From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dibyendu Majumdar Subject: Re: Sparse 0.5.1 RC5 released. Date: Mon, 14 Aug 2017 00:44:07 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: Received: from mail-vk0-f51.google.com ([209.85.213.51]:37566 "EHLO mail-vk0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751202AbdHMXoI (ORCPT ); Sun, 13 Aug 2017 19:44:08 -0400 Received: by mail-vk0-f51.google.com with SMTP id r199so27009400vke.4 for ; Sun, 13 Aug 2017 16:44:08 -0700 (PDT) In-Reply-To: Sender: linux-sparse-owner@vger.kernel.org List-Id: linux-sparse@vger.kernel.org To: Luc Van Oostenryck Cc: Linux-Sparse On 14 August 2017 at 00:40, Luc Van Oostenryck wrote: > On Mon, Aug 14, 2017 at 1:35 AM, Dibyendu Majumdar > wrote: >> >> I am not really sure I understand. In dmrC I get following LLVM output >> for above: >> ; ModuleID = 'out.bc' >> source_filename = "dmrC" >> >> @a = global i8 0, align 1 >> @b = global i8 0, align 1 >> >> ; Function Attrs: argmemonly nounwind >> declare void @llvm.memset.p0i8.i32(i8* nocapture writeonly, i8, i32, i32, i1) #0 >> >> define void @c() { >> L0: >> %R1 = load i8, i8* @a >> %R2 = sext i8 %R1 to i32 >> %R3 = and i32 %R2, 1 >> %R31 = trunc i32 %R3 to i8 >> store i8 %R31, i8* @b >> ret void >> } >> >> attributes #0 = { argmemonly nounwind } >> >> >> What do you get? > > Nothing at all since I get LLVM error: > Invalid bitcast > %R31 = bitcast i32 %R3 to i8 > > I suppose you must have some fixes I haven't or > one of my other fixes created this problem. > I even think I now know which one. > I have more fixes (I reported all the issues on the mailing list). I think I have got to the point that I find most issues are now with Sparse IR not LLVM backend. Regards