[LLVMdev] Self-referential instruction from jump threading

Hal Finkel hfinkel at anl.gov
Sun Oct 21 22:18:22 PDT 2012


Hello,

After investigating PR14133, I've discovered that jump threading can output self-referential instructions:
%inc.us = add nsw i32 %inc.us, 1

At least in the test case for that bug report, the relevant code is later deleted (perhaps it is unreachable), and so this does not cause a problem. Unfortunately, when vectorization is enabled, this instruction causes BBVectorize to hang. Should I make BBVectorize ignore this kind of thing, on the assumption that it occurs only in unreachable (or otherwise dead) code, or should this be fixed at the source (in jump threading in this case)?

Thanks again,
Hal

-- 
Hal Finkel
Postdoctoral Appointee
Leadership Computing Facility
Argonne National Laboratory



More information about the llvm-dev mailing list