LLVM fixes

This pull request fixes LLVM PR's 20893 and 21302.