1
Fork 0

Fix an AMDGPU related load bit range metadata assertion.

This commit is contained in:
Richard Diamond 2018-07-18 22:05:08 -05:00
parent bfddedee37
commit 66e8e1953e

View file

@ -496,6 +496,14 @@ impl Builder<'a, 'll, 'tcx> {
pub fn range_metadata(&self, load: &'ll Value, range: Range<u128>) {
if self.sess().target.target.arch == "amdgpu" {
// amdgpu/LLVM does something weird and thinks a i64 value is
// split into a v2i32, halving the bitwidth LLVM expects,
// tripping an assertion. So, for now, just disable this
// optimization.
return;
}
unsafe {
let llty = val_ty(load);
let v = [