This is an archive of the discontinued LLVM Phabricator instance.

[FuzzMutate] introduce vector operations, select and fneg into InstInjectorStrategy
ClosedPublic

Authored by Peter on Dec 12 2022, 4:33 PM.

Diff Detail

Event Timeline

Peter created this revision.Dec 12 2022, 4:33 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 12 2022, 4:33 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
Peter requested review of this revision.Dec 12 2022, 4:33 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 12 2022, 4:33 PM
arsenm requested changes to this revision.Dec 12 2022, 7:05 PM
arsenm added inline comments.
llvm/include/llvm/FuzzMutate/OpDescriptor.h
95–106

This is just Type::getScalarType

104

No need for make

125–133

This is just Ty->isIntOrIntVectorTy(1)

144

Ty->isFPOrFPVectorTy()

194

no else after return

209

Pretty sure those don't exist. Closest would be vectors in arrays, which I don't think support arithmetic operations

llvm/unittests/FuzzMutate/StrategiesTest.cpp
37–38

The odd sizes, particularly 1 and 3, are most likely to break something

This revision now requires changes to proceed.Dec 12 2022, 7:05 PM
Peter updated this revision to Diff 482715.Dec 13 2022, 9:57 PM
Peter marked 7 inline comments as done.

use API provided by Type

Peter added inline comments.Dec 28 2022, 4:20 PM
llvm/include/llvm/FuzzMutate/OpDescriptor.h
125–133

With the API you mentioned, (really helpful btw), I think I'll remove anyXorVecX for now, they won't come back until I finish bitcast instructions, which is so complicated I have to put it in a stand alone patch.

Peter added a comment.Jan 11 2023, 4:44 PM

@arsenm Hey Matt, does these changes look good to you? If so we can merge it, I have some more patches depending on this one. I am hoping we can get these patches out so to better help fuzzing in the community. :)

Peter added a comment.Mar 28 2023, 5:28 AM

@arsenm Hi Matt, Would you mind spend some time and review this patch?

arsenm added inline comments.Mar 30 2023, 10:57 AM
llvm/include/llvm/FuzzMutate/OpDescriptor.h
190–191

Separate declaration statements with dyn_cast?

192

Usual style is to not include the explicit nullptr comparisons throughout here

207

Do you mean VectorType::isValidElementType?

llvm/unittests/FuzzMutate/OperationsTest.cpp
189

Add some tests with scalable vectors, and vectors of pointers

Peter updated this revision to Diff 509887.Mar 30 2023, 8:09 PM
Peter marked 3 inline comments as done.

Add more tests.

Peter marked an inline comment as done.Mar 30 2023, 8:14 PM
arsenm accepted this revision.Mar 31 2023, 1:57 PM
This revision is now accepted and ready to land.Mar 31 2023, 1:57 PM