Bug 96877 - Bioshock Infinite: LLVM triggered Diagnostic Handler: Illegal instruction detected: Operand has incorrect register class.
Summary: Bioshock Infinite: LLVM triggered Diagnostic Handler: Illegal instruction det...
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/radeonsi (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Default DRI bug account
QA Contact: Default DRI bug account
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-10 09:08 UTC by Christoph Haag
Modified: 2016-07-12 16:10 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Reduced test case, fails with llc -march=amdgcn -verify-machineinstrs (946 bytes, text/plain)
2016-07-10 11:25 UTC, Nicolai Hähnle
Details
Treat insert and extract equally in selectMOVRELOffsetImpl (795 bytes, patch)
2016-07-10 17:24 UTC, Nicolai Hähnle
Details | Splinter Review

Description Christoph Haag 2016-07-10 09:08:12 UTC
This happens on my HD 7970M.

"Very Low" graphics settings work fine but trying to start with "Medium" settings throws this error before it even gets to the menu.

The files are bit too big for bugzilla I think, so

Here is an stderr log with R600_DEBUG="vs,ps,gs,tes,tcs":
http://haagch.frickel.club/files/err.txt.gz

Here is an apitrace that causes the error:
http://haagch.frickel.club/files/bioshock.i386.trace.xz

Happened with latest mesa git and llvm 3.9.0svn_r274975 and now with 3.9.0svn_r275008 too.
Comment 1 Nicolai Hähnle 2016-07-10 11:25:08 UTC
Created attachment 124987 [details]
Reduced test case, fails with llc -march=amdgcn -verify-machineinstrs

I can reproduce this, and I obtained the attached reduced testcase which has an error since r274954 "AMDGPU: Improve offset folding for register indexing". I'm not sure how that change is related to the particular error that I get...
Comment 2 Nicolai Hähnle 2016-07-10 17:24:46 UTC
Created attachment 124989 [details] [review]
Treat insert and extract equally in selectMOVRELOffsetImpl

The attached patch fixes the bug for me.
Comment 3 Michel Dänzer 2016-07-11 07:49:19 UTC
FWIW, Nicolai's patch seems to fix lots of piglit regressions on my Kaveri.
Comment 4 Nicolai Hähnle 2016-07-11 13:09:00 UTC
Another update: there are two separate problems in LLVM which "cooperate" to lead to this bug. http://reviews.llvm.org/D22210 and http://reviews.llvm.org/D22217 fix both problems (and either is sufficient for this bug here).
Comment 5 Christoph Haag 2016-07-12 16:10:59 UTC
Both of these are in in llvm svn now.

Enabling and disabling anti aliasing works without this error.
Thanks for the fix.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.