Created attachment 20170 [details] proposed fix: convert RLDICLo using a 64-bit InVal too ref: https://bugzilla.redhat.com/show_bug.cgi?id=1563393 We found one test case in the "futures" crate that started failing on ppc64 when we upgraded to Rust 1.25 with LLVM 6.0 (Fedora's LLVM, not Rust's fork). The same test case still passes with Rust 1.25 and LLVM 5.0. I bisected this to https://reviews.llvm.org/D41369. You can find IR and binaries before and after that commit on the rhbz, but I didn't figure out an easy way to reproduce this directly. I went through the whole motion of building LLVM, building rustc with that LLVM, then running the "futures" tests. The attached patch seems to solve it, using a 64-bit value for PPC::RLDICLo in PPCInstrInfo::convertToImmediateForm. I don't know enough about LLVM or PPC to distill a proper test though, so I hope someone who knows the platform better can figure that out.
Thank you so much for tracking this down and suggesting a fix. You're absolutely right, both RLDICL and RLDICLo operate on 64-bit inputs and the fix is fine. Do you want me to commit it for you or do you have commit access?
I don't have commit access, so it would be great if you commit it, thanks!
Committed revision 329852. You mentioned that this was discovered in LLVM 6.0. Please let me know if you need this back-ported.
Thanks again! Yes, I would appreciate having this on 6.0 too. That is, even if it's not backported officially here, I would still ask our distro maintainers to patch it - so we might as well share the fix broadly. :)
Hi Hans, I didn't see whether we have a meta bug for tracking commits that we would like backported to 6.0 yet. Do you have one set up to track this?
(In reply to Nemanja Ivanovic from comment #5) > Hi Hans, > I didn't see whether we have a meta bug for tracking commits that we would > like backported to 6.0 yet. Do you have one set up to track this? Yes, it's Bug 36649
Thanks Hans.
r329852 was merged to the release_60 branch as r330076.