aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/COFFModuleDefinition.cpp
diff options
context:
space:
mode:
authorNicolai Haehnle <nhaehnle@gmail.com>2017-07-18 14:54:41 +0000
committerNicolai Haehnle <nhaehnle@gmail.com>2017-07-18 14:54:41 +0000
commita253e4c02873ae888b507443174e657b012b8286 (patch)
tree520ae7c5fb69437d5c617142f345f52f0510aee7 /llvm/lib/Object/COFFModuleDefinition.cpp
parent9d33fb1bc5f4b7c2687828c306a5f944abd641ef (diff)
downloadllvm-a253e4c02873ae888b507443174e657b012b8286.zip
llvm-a253e4c02873ae888b507443174e657b012b8286.tar.gz
llvm-a253e4c02873ae888b507443174e657b012b8286.tar.bz2
AMDGPU: Fix crash when folding immediates into multiple uses
Summary: When an immediate is folded by constant folding, we re-scan the entire use list for two reasons: 1. The constant folding may have created a new use of the same reg. 2. The constant folding may have removed an additional use in the list we're currently traversing (e.g., constant folding an S_ADD_I32 c, c). However, this could previously lead to a crash when an unrelated use was added twice into the FoldList. Since we re-scan the whole list anyway, we might as well just clear the FoldList again before we do so. Using a MIR test to show this because real code seems to trigger the issue only in connection with some really subtle control flow structures. Fixes GL45-CTS.shading_language_420pack.binding_images on gfx9. Reviewers: arsenm Subscribers: kzhuravl, wdng, yaxunl, dstuttard, tpr, llvm-commits, t-tye Differential Revision: https://reviews.llvm.org/D35416 llvm-svn: 308314
Diffstat (limited to 'llvm/lib/Object/COFFModuleDefinition.cpp')
0 files changed, 0 insertions, 0 deletions