[FuzzMutate] Correct type cast and add unit test for FCmp
authorPeter Rong <PeterRong96@gmail.com>
Fri, 21 Apr 2023 23:50:39 +0000 (16:50 -0700)
committerPeter Rong <PeterRong96@gmail.com>
Wed, 26 Apr 2023 00:28:01 +0000 (17:28 -0700)
commit0f9b1c8872ef0bb041b301f9932d3f0be180f425
tree876465308dcc06f8add9b2d1a271ae60aaa4eff9
parentda0700829f163ad5d8bbd61aa137e586a816e06e
[FuzzMutate] Correct type cast and add unit test for FCmp

This revision fixes an incorrect type cast from Instruction to ICmpInstr, which should have been to FCmpInstr instead. It turns out that StrategiesTest.cpp was missing a test case for InstModificationIRStrategy and FCmp, which is also now implemented in this revision. After this revision, [[ https://reviews.llvm.org/D148854 | llvm-stress in D148854 ]] no longer crashes randomly.

Reviewed By: Peter

Differential Revision: https://reviews.llvm.org/D148972
llvm/lib/FuzzMutate/IRMutator.cpp
llvm/unittests/FuzzMutate/StrategiesTest.cpp