Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SCEV] Add support for GEPs over scalable vectors.
Because we have to use a ConstantExpr at some point, the canonical form isn't set in stone, but this seems reasonable. The pretty sizeof(<vscale x 4 x i32>) dumping is a relic of ancient LLVM; I didn't have to touch that code. :) Differential Revision: https://reviews.llvm.org/D75887
- Loading branch information
1 parent
ad7b930
commit 65fc706
Showing
3 changed files
with
30 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
; RUN: opt -scalar-evolution -analyze < %s | FileCheck %s | ||
|
||
; CHECK: %1 = getelementptr <vscale x 4 x i32>, <vscale x 4 x i32>* null, i32 3 | ||
; CHECK: --> (3 * sizeof(<vscale x 4 x i32>)) U: [0,-15) S: [-9223372036854775808,9223372036854775793) | ||
; CHECK: %2 = getelementptr <vscale x 1 x i64>, <vscale x 1 x i64>* %p, i32 1 | ||
; CHECK: --> (sizeof(<vscale x 1 x i64>) + %p) U: full-set S: full-set | ||
define void @a(<vscale x 1 x i64> *%p) { | ||
getelementptr <vscale x 4 x i32>, <vscale x 4 x i32> *null, i32 3 | ||
getelementptr <vscale x 1 x i64>, <vscale x 1 x i64> *%p, i32 1 | ||
ret void | ||
} |