Yuanfang Chen wrote: > Hello guys, > > Do we have a pass to do unconditional branch folding except the one in > Codegen? I checked in the lib/Transforms/Scalar, did not see any > promising one. SimplifyCFG? The pass is lib/Transforms/Scalar/SimplifyCFGPass.cpp but the logic is really in lib/Transforms/Utils/SimplifyCFG.cpp . Nick