[llvm] [GlobalIsel][AArch64] legalize ptr add (PR #89218)

David Green via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 28 04:12:37 PDT 2024


davemgreen wrote:

> What do you mean by store? The mir test shows that it successfully legalized the ptradd.

```
define void @ptr_add_4_vector_ptr(ptr %vec, <4 x i32> %offset) {
  %ptr_add = getelementptr i8, ptr %vec, <4 x i32> %offset
  store <4 x ptr> %ptr_add, ptr %vec
  ret void
}
```

As the problems you have encountered has shown, mir tests are not very useful in isolation and end-to-end tests work better if they are available.

https://github.com/llvm/llvm-project/pull/89218


More information about the llvm-commits mailing list