[Mesa-dev] Mesa (master): Revert "radeon/llvm: Use alloca instructions for larger arrays"

Nicolai Hähnle nhaehnle at gmail.com
Sat Jul 23 14:07:37 UTC 2016


On 22.07.2016 12:08, Michel Dänzer wrote:
> On 21.07.2016 18:17, Matt Arsenault wrote:
>>> On Jul 21, 2016, at 01:03, Michel Dänzer <michel at daenzer.net
>>> <mailto:michel at daenzer.net>> wrote:
>>>
>>> On 21.07.2016 00:04, Michel Dänzer wrote:
>>>> On 15.07.2016 05:15, Marek =?UNKNOWN?B?T2zFocOhaw==?= wrote:
>>>>> Module: Mesa
>>>>> Branch: master
>>>>> Commit: f84e9d749fbb6da73a60fb70e6725db773c9b8f8
>>>>> URL:
>>>>>    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f84e9d749fbb6da73a60fb70e6725db773c9b8f8
>>>>>
>>>>> Author: Marek Olšák <marek.olsak at amd.com <mailto:marek.olsak at amd.com>>
>>>>> Date:   Thu Jul 14 22:07:46 2016 +0200
>>>>>
>>>>> Revert "radeon/llvm: Use alloca instructions for larger arrays"
>>>>>
>>>>> This reverts commit 513fccdfb68e6a71180e21827f071617c93fd09b.
>>>>>
>>>>> Bioshock Infinite hangs with that.
>>>>
>>>> Unfortunately, this change caused the piglit test
>>>> shaders at glsl-fs-vec4-indexing-temp-dst-in-loop (and possibly others) to
>>>> hang my Kaveri. Any ideas for how we can get out of this conundrum?
>>>
>>> The hang was introduced by LLVM SVN r275934 ("AMDGPU: Expand register
>>> indexing pseudos in custom inserter"). The good/bad (without/with
>>> r275934) shader dumps and the GALLIUM_DDEBUG=800 dump corresponding to
>>> the hang are attached.
>>>
>>>
>>> BTW, even with Marek's change above reverted, I still see some piglit
>>> regressions compared to last week, but I'm not sure if those are all
>>> related to the same LLVM change.
>>>
>>>
>>> --
>>> Earthling Michel Dänzer               |
>>>               http://www.amd.com <http://www.amd.com/>
>>> Libre software enthusiast             |             Mesa and X developer
>>> <glsl-fs-vec4-indexing-temp-dst-in-loop.bad><glsl-fs-vec4-indexing-temp-dst-in-loop.good><shader_runner_3339_00000000.txt>
>>
>> This fixes the verifier error in it: https://reviews.llvm.org/D22616
>
> This seems to fix the hang, thanks!
>
>
>> This fixes another issue which may be
>> related: https://reviews.llvm.org/D22556
>
> Even with that applied as well, there are still piglit regressions
> compared to early last week, see the attached dumps (look for "LLVM
> triggered Diagnostic Handler:").

Looks like the "rewrite undef" part of the Two Address Instruction Pass 
also needs to be adjusted -- I've attached a bugpoint-reduced test case.

Also, the hang that motivated the original revert in Mesa should be 
fixed with https://reviews.llvm.org/D22673 (and the related 
https://reviews.llvm.org/D22675 is also needed for correctness, though 
probably not for fixing the hang).

Cheers,
Nicolai

>
>
>
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
; ModuleID = '<stdin>'
source_filename = "bugpoint-output-d6bdb0e.bc"
target triple = "amdgcn--"

define amdgpu_vs void @main() {
main_body:
  %tmp = call float @llvm.SI.load.const(<16 x i8> undef, i32 0)
  %tmp1 = bitcast float %tmp to i32
  %tmp2 = extractelement <4 x float> <float undef, float undef, float undef, float 0.000000e+00>, i32 %tmp1
  %tmp3 = insertelement <4 x float> undef, float %tmp2, i32 undef
  %tmp4 = extractelement <4 x float> %tmp3, i32 2
  call void @llvm.SI.export(i32 15, i32 0, i32 0, i32 32, i32 0, float %tmp4, float undef, float undef, float undef)
  ret void
}

; Function Attrs: nounwind readnone
declare float @llvm.SI.load.const(<16 x i8>, i32) #0

; Function Attrs: nounwind
declare void @llvm.SI.export(i32, i32, i32, i32, i32, float, float, float, float) #1

attributes #0 = { nounwind readnone }
attributes #1 = { nounwind }


More information about the mesa-dev mailing list