[PATCH] D139594: [FuzzMutate] InstModificationStrategy, add FastMath flags and exact flags to instructions.

Peter Rong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 7 19:09:39 PST 2022


Peter added inline comments.


================
Comment at: llvm/lib/FuzzMutate/IRMutator.cpp:221-223
+          // Set everything
+          Modifications.push_back([&Inst] { Inst.setFast(true); });
+          Modifications.push_back([&Inst] { Inst.setFast(false); });
----------------
arsenm wrote:
> I don't know exactly how the fuzz argument works, but won't these interfere? Setting all is superfluous with setting every individual flag
Yes, setting all is superfluous. I removed the repeated part, now we are only flipping the setting. (So we don't set true to ture).

It takes a lot of mutations to set(or unset) every flag, so I think its a good idea that we keep an option to set everything at once.


================
Comment at: llvm/unittests/FuzzMutate/StrategiesTest.cpp:354
+        %PHIdouble = phi double [%a, %True], [%b, %False]  \n\
+        %Call = call [4 x <4 x double>] @vecdouble(double %PHIdouble)  \n\
+        %c = fneg double %PHIdouble  \n\
----------------
arsenm wrote:
> Do we even allow fmf on arrays of vectors? 
https://godbolt.org/z/nGarYT6Ef

I think we do. The documentation (for call, phi, and select) says "that return a floating-point scalar or vector type, or an array (nested to any depth) of floating-point scalar or vector types", and llc is not complaining about this.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139594/new/

https://reviews.llvm.org/D139594



More information about the llvm-commits mailing list