I’m working on finding(generating) programs which results in bad codegen when (-g, !-g) option. As suggested in llvm-dev list I tried diffing the disassembly of object files .text section with -g enabled and not enabled for all SingleSource unittests .c files, I used all optimization levels [0,1,2,3,s,z] but I didn’t get any bad codegen behavior.
And then, I used csmith tool to randomly generate .cpp files and compile them with (-g, !-g) at various opt levels, after trying for 3 hours I can only able to produce 2 bad codegen behaviors. Is there any way for producing bad codegen behaviors?
Csmith use many options to generate code, anyone with csmith experience please guide me how to make use of those options to fullest in this case?
Thank you very much