Added a test to the IR Fuzzer that verifies the result of IR before and after an optimization pass. #2465
+329
−14
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Sug
2B73
gestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added a test to the IR Fuzzer that verifies the result of IR before and after an optimization pass.
A new IrFuzzTest was added which generates random IR, runs the ReassociationPass over it, plugs in parameters into the non-reassociated IR and the reassociated IR, and verifies that the results are the same. To achieve this, I added a function which accepts an optimization pass object and then proceeds to perform all of the logic. Additionally, the IrFuzzDomain was updated to allow you to generate fuzzed integer parameters, with a way to configure how many parameter sets are generated for each IR function.