Skip to content

Commit

Permalink
Remove the last remaining call to getPointerElementType() (halide#6715)
Browse files Browse the repository at this point in the history
* Remove the last remaining call to getPointerElementType()

LLVM is moving to opaque pointers, we must have missed this one in previous work

* ARM vst mangling needs to be conditional on opaque ptrs

The fixes from last week regarding mangling of arm vst intrinsics needs to be made conditional on whether the pointer is opaque or not; this will change based on whether `-D CLANG_ENABLE_OPAQUE_POINTERS=ON|OFF` is defined when LLVM is built, but should be sniffed via this API, according to my LLVM contact.

* Revert "ARM vst mangling needs to be conditional on opaque ptrs"

This reverts commit 9901314.
  • Loading branch information
steven-johnson authored and ardier committed Mar 3, 2024
1 parent 42cdc85 commit 67ba6f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/CodeGen_X86.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ void CodeGen_X86::visit(const Load *op) {
const Ramp *ramp = op->index.as<Ramp>();
internal_assert(ramp) << "Expected AMXTile to have index ramp\n";
Value *ptr = codegen_buffer_pointer(op->name, op->type, ramp->base);
LoadInst *load = builder->CreateAlignedLoad(ptr->getType()->getPointerElementType(), ptr, llvm::Align(op->type.bytes()));
LoadInst *load = builder->CreateAlignedLoad(llvm_type_of(upgrade_type_for_storage(op->type)), ptr, llvm::Align(op->type.bytes()));
add_tbaa_metadata(load, op->name, op->index);
value = load;
return;
Expand Down

0 comments on commit 67ba6f5

Please sign in to comment.