Issue 79735
Summary Loss of `addrspace` attribute when canonicalizing `getelementptr` instruction
Labels new issue
Assignees
Reporter Nirhar
    Hi @nikic !

I see that you landed a patch ([Link](https://github.com/llvm/llvm-project/commit/90ba33099cbb17e7c159e9ebc5a512037db99d6d)) that standardizes the source pointer type of Geps to i8 type. However I noticed that instructions of the type:
```
%gep = getelementptr ptr addrspace(1), ptr %ptr, i64 42
```
get modifiied to 
```
%gep = getelementptr i8, ptr %ptr, i64 42
```

thereby losing the addrspace(1) attribute. Is this the intended behaviour of this patch(which I believe should not be)? 
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to