One also may bias values to be similar (or equal) to other recently generated values. This was a trick used in the compiler tester yarpgen, where it was useful in testing optimization of bitwise operators on integers.
https://github.com/intel/yarpgen
https://github.com/intel/yarpgen/blob/main/papers/yarpgen-oo...
(see "Policies for constants", page 196:8.)
The generator avoids UB, and has
found 83 new bugs in GCC, 62 in LLVM, and 76 in the Intel® C++ Compiler.
For gcc mostly in the tree-optimizer, sanitizers and x86 backend, but also several wrong rtl-opts and middle-end bugs. With llvm interestingly much more user-visible internal compiler errors (ICE), than silently emitting wrong code as with gcc.
There's also https://github.com/intel/yarpgen which I haven't used. I believe there are a couple of others...