[FuzzMutate] Correct type cast and add unit test for FCmp
authorPeter Rong <PeterRong96@gmail.com>
Fri, 21 Apr 2023 23:35:45 +0000 (16:35 -0700)
committerPeter Rong <PeterRong96@gmail.com>
Fri, 21 Apr 2023 23:37:36 +0000 (16:37 -0700)
commit1a3f158add6099914f943ac87fb3b0b8738f8ec8
treea9e378b8390daf676a94cba8aada83259c79b2da
parentdbdb4affa00785c31675be0535b4dc89136b8502
[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