Fixes PR31789 - When loop-vectorize tries to use these intrinsics for a non-default address space pointer we fail with a "Calling a function with a bad signature!" assertion. This patch tries to solve this by adding the 'vector of pointers' argument as an overloaded type which will determine the address space.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/IR/Function.cpp | ||
---|---|---|
1057 ↗ | (On Diff #93452) | I suggest to keep the standard (or close to standard) Argument_Info structure and access it though functions. |
Comment Actions
I might have missed something, but all the examples in the langref and test-cases include only pointers to addspace(0). Maybe change/add tests and example to include non-zero address-spaces?
Comment Actions
I have added new test-cases in test/Transforms/LoopVectorize/X86/gather_scatter.ll to check that the Loop Vectorizer can successfully create scatter/gather instructions for pointers in the non-default address space.
I'll add non-default address space examples to the langref - thanks!
lib/IR/Function.cpp | ||
---|---|---|
724 ↗ | (On Diff #95712) | This is one more place where I suggest to replace the hardcoded "shift" with a method. |