[PATCH] D76464: [ValueTracking][SVE] Fix getOffsetFromIndex for scalable vector.
Huihui Zhang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 19 17:00:20 PDT 2020
huihuiz created this revision.
huihuiz added reviewers: sdesmalen, efriedma, apazos, reames.
huihuiz added a project: LLVM.
Herald added subscribers: psnobl, arphaman, rkruppe, hiraditya, tschuett.
Return None if GEP index type is scalable vector. Size of scalable vectors
are multiplied by a runtime constant.
Avoid transforming:
%a = bitcast i8* %p to <vscale x 16 x i8>*
%tmp0 = getelementptr <vscale x 16 x i8>, <vscale x 16 x i8>* %a, i64 0
store <vscale x 16 x i8> zeroinitializer, <vscale x 16 x i8>* %tmp0
%tmp1 = getelementptr <vscale x 16 x i8>, <vscale x 16 x i8>* %a, i64 1
store <vscale x 16 x i8> zeroinitializer, <vscale x 16 x i8>* %tmp1
into:
%a = bitcast i8* %p to <vscale x 16 x i8>*
%tmp0 = getelementptr <vscale x 16 x i8>, <vscale x 16 x i8>* %a, i64 0
%1 = bitcast <vscale x 16 x i8>* %tmp0 to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %1, i8 0, i64 32, i1 false)
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D76464
Files:
llvm/lib/Analysis/ValueTracking.cpp
llvm/test/Transforms/MemCpyOpt/vscale-memset.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76464.251504.patch
Type: text/x-patch
Size: 7141 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200320/8e250f32/attachment.bin>
More information about the llvm-commits
mailing list