Page MenuHomePhabricator

[SVE] Remove calls to isScalable from IR
ClosedPublic

Authored by ctetreau on Apr 7 2020, 4:40 PM.

Diff Detail

Event Timeline

ctetreau created this revision.Apr 7 2020, 4:40 PM
Herald added a project: Restricted Project. · View Herald Transcript
ctetreau updated this revision to Diff 256113.Apr 8 2020, 2:26 PM

rebase, fix permissions

While immediate feedback would be greatly appreciated, this commit won't actually build until D77587 is merged. I'll ping the thread when this happens if this commit hasn't been accepted yet.

ctetreau marked an inline comment as done.Apr 10 2020, 2:50 PM
ctetreau added inline comments.
llvm/lib/IR/Function.cpp
1358

I think this might not be correct

efriedma added inline comments.Apr 10 2020, 3:16 PM
llvm/lib/IR/Constants.cpp
230

This is a functional change, and not really related to the subject of this patch.

llvm/lib/IR/Function.cpp
1358

Yes, !VTy || !VTy->isScalable() is equivalent to !isa<ScalableVectorType>(Ty).

ctetreau updated this revision to Diff 257149.Apr 13 2020, 4:42 PM

address code review issues

sdesmalen added inline comments.Apr 22 2020, 8:00 AM
llvm/include/llvm/IR/PatternMatch.h
2178

nit: now that we can use isa<ScalableVectorType>, it's probably better to write this as:

auto *DerefTy = PtrTy->getPointerElementType();
if (isa<ScalableVectorType>(DerefTy) &&
    DL.getTypeAllocSizeInBits(DerefTy).getKnownMinSize() == 8)
llvm/unittests/IR/VectorTypesTest.cpp
179

Shouldn't this be EXPECT_FALSE?

ctetreau marked 2 inline comments as done.Apr 22 2020, 8:44 AM
ctetreau added inline comments.
llvm/include/llvm/IR/PatternMatch.h
2178

will do

llvm/unittests/IR/VectorTypesTest.cpp
179

yes, not sure what happened here...

ctetreau updated this revision to Diff 259312.Apr 22 2020, 8:54 AM

address code review issues

sdesmalen accepted this revision.Apr 22 2020, 9:21 AM

Okay thanks for fixing, LGTM!

This revision is now accepted and ready to land.Apr 22 2020, 9:21 AM
This revision was automatically updated to reflect the committed changes.