[PATCH] D34044: [WebAssembly] WebAssemblyFastISel getelementptr variable index support

Dan Gohman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 9 16:42:08 PDT 2017


sunfish added a comment.

The underlying problem is that after it folds the dynamic index into the address base register, the code at the bottom of WebAssemblyFastISel::computeAddress just sticks the getelementptr base into the address base register, accidentally overwriting the previous value. A more precise fix would be to have that code at the bottom of WebAssemblyFastISel::computeAddress return false in the case where there's already a (non-zero) base register.

For extra caution, it may be possible to have Address::setReg assert that the base is zero before overwriting it.


https://reviews.llvm.org/D34044





More information about the llvm-commits mailing list