Hi Chris, If you have everything setup to test, can you generate the LLVM IR with -03 from 3.4.1 and 3.5 to be sure they match. Then we can focus on the backend. Thanks, Mehdi> On Feb 3, 2015, at 1:58 AM, Chris Sears <chris.sears at gmail.com> wrote: > > So between 3.4.1 and 3.5 since it isn't in 3.4.1 and it is in the current XCode.-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150203/1e0b131a/attachment.html>
I was using this GCC compiler comparison site. It's well done but unfortunately it's not up to date. The author Matt Godbolt said he was updating it: http://gcc.godbolt.org/# No, I do not have 3.4.1 but 3.5 is the current XCode release. It's pretty much already narrowed. 3.4.1 generates correct assembly (except bug #2 is here as well, see below) 3.5 (XCode) generates correct IR and bad assembly So the problem seems to show up with 3.5. The attached IR is from 3.5 XCode clang -S -O3 -emit-llvm newtst.c. There are TWO bugs here. There's the Constant Hoisting bug (#1) and the failure to match a AND/CMP (#2). My current theory for #1 is that Constant Hoisting for the X86 is relatively recent or that Costing changed and that what we're seeing is that it worked correctly before. I think my proposed patch is correct and I'd recommend the ARM folks look at it. I have no theory for bug #2 and I've already spent a day on it. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150203/93f91cac/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: newtst.ll Type: application/octet-stream Size: 2674 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150203/93f91cac/attachment.obj>
> On Feb 3, 2015, at 10:20 AM, Chris Sears <chris.sears at gmail.com> wrote: > > I was using this GCC compiler comparison site. It's well done but unfortunately it's not up to date. The author Matt Godbolt said he was updating it: > > http://gcc.godbolt.org/# <http://gcc.godbolt.org/#> > > No, I do not have 3.4.1 but 3.5 is the current XCode release. It's pretty much already narrowed. > > 3.4.1 generates correct assembly (except bug #2 is here as well, see below) > 3.5 (XCode) generates correct IR and bad assembly > > So the problem seems to show up with 3.5. The attached IR is from 3.5 XCode clang -S -O3 -emit-llvm newtst.c. > > There are TWO bugs here. There's the Constant Hoisting bug (#1) and the failure to match a AND/CMP (#2). My current theory for #1 is that Constant Hoisting for the X86 is relatively recent or that Costing changed and that what we're seeing is that it worked correctly before. I think my proposed patch is correct and I'd recommend the ARM folks look at it.I may have missed on email, did you send a patch? Thanks, Mehdi> > I have no theory for bug #2 and I've already spent a day on it. > <newtst.ll>-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150203/82c935a5/attachment.html>
> On Feb 3, 2015, at 10:20 AM, Chris Sears <chris.sears at gmail.com> wrote: > > I was using this GCC compiler comparison site. It's well done but unfortunately it's not up to date. The author Matt Godbolt said he was updating it: > > http://gcc.godbolt.org/# <http://gcc.godbolt.org/#> > > No, I do not have 3.4.1 but 3.5 is the current XCode release. It's pretty much already narrowed.The Xcode release is from an Apple branch, which is not done at the same time as the LLVM 3.5 branch. Note the “svn” on the end of the 3.5 reference in the version info. That means that the Apple branch was done sometime between when open source 3.4 was branched and when open source 3.5 was branched. -Jim> > 3.4.1 generates correct assembly (except bug #2 is here as well, see below) > 3.5 (XCode) generates correct IR and bad assembly > > So the problem seems to show up with 3.5. The attached IR is from 3.5 XCode clang -S -O3 -emit-llvm newtst.c. > > There are TWO bugs here. There's the Constant Hoisting bug (#1) and the failure to match a AND/CMP (#2). My current theory for #1 is that Constant Hoisting for the X86 is relatively recent or that Costing changed and that what we're seeing is that it worked correctly before. I think my proposed patch is correct and I'd recommend the ARM folks look at it. > > I have no theory for bug #2 and I've already spent a day on it. > <newtst.ll>_______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150203/4b054661/attachment.html>