HomePhabricator

[NVPTX] fix a crash bug in NVPTXFavorNonGenericAddrSpaces

Authored by jingyue on Jun 9 2015, 2:50 PM.

Description

[NVPTX] fix a crash bug in NVPTXFavorNonGenericAddrSpaces

Summary:
We used to assume V->RAUW only modifies the operand list of V's user.
However, if V and V's user are Constants, RAUW may replace and invalidate V's
user entirely.

This patch fixes the above issue by letting the caller replace the
operand instead of calling RAUW on Constants.

Test Plan: @nested_const_expr and @rauw in access-non-generic.ll

Reviewers: broune, jholewinski

Reviewed By: broune, jholewinski

Subscribers: jholewinski, llvm-commits

Differential Revision: http://reviews.llvm.org/D10345

llvm-svn: 239435

Details

Committed
jingyueJun 9 2015, 2:50 PM
Reviewer
broune
Differential Revision
D10345: [NVPTX] fix a crash bug in NVPTXFavorNonGenericAddrSpaces
Parents
rGbc05163f15cd: LibDriver, llvm-lib: introduce.
Branches
Unknown
Tags
Unknown