I’m trying to debug what I think is a miscompilation that only shows up when clang is passed -O1 -vectorize-slp
. I want to use bugpoint (or some other appropriate tool, if bugpoint doesn’t support the new pass manager?) to try to further whittle down the optimization passes and/or IR necessary to trigger the bug, but I’ve been having issues figuring out what passes to give to opt
to reproduce the bug so I can use bugpoint.
I started with -passes='default<O1>,slp-vectorizer'
, since those seemed to most closely resemble the flags given to clang, but those produced an executable which did not exhibit the bug. I tried adding some other “nearby” passes as shown by the -opt-bisect-limit
output, but that didn’t work, either. Some rudimentary searches didn’t seem to show a clear correspondence between the Clang -vectorize-slp
flag and opt
passes, but I would not be surprised if I were just looking in the wrong place.
The other flags I’ve seen when searching all appear to be for the old pass manager; in particular, something like -debug-pass=Arguments
seemed like it would be helpful, but from what I could tell that is for the old pass manager. I’m tempted to try passing everything from the -opt-bisect-limit
output, but that’s a rather large number of passes and I’m hoping there’s a more efficient way.
Assuming I’m looking in the right direction, how do I determine what passes to give to opt
to best recreate what Clang is doing? Alternatively, is there a different approach I should be taking?