Details
Diff Detail
Event Timeline
llvm/test/Transforms/SimplifyCFG/branch-fold-multiple.ll | ||
---|---|---|
6 | Does this need to be target specific? We should definitely have at least some target-independent tests here. |
llvm/test/Transforms/SimplifyCFG/branch-fold-multiple.ll | ||
---|---|---|
6 | The cost of bonus instructions depends on the target triple and processor (https://github.com/llvm/llvm-project/blob/main/llvm/lib/Transforms/Utils/SimplifyCFG.cpp#L3676). Certain processors have high costs than others, causing the branch not to be folded. For example, if I replace the target triple of this lit test with x86_64 and remove the target processor. This lit test still passes since x86_64 behaves similarly as amdgcn gfx906. However, if I replace the target triple with x86, this lit test will fail since the branches are never folded even without my patch. How about I make the IR in this lit test target independent, and use -mtriple to test a few triples which are relevant to the test? |
llvm/test/Transforms/SimplifyCFG/branch-fold-multiple.ll | ||
---|---|---|
6 |
The drawback of the above approach is that it requires multiple registered targets, which can make it less tested on bots. Another way is to use the existing option for bonus insts threshold. Increase it so that the lit test behaves the same on all targets. Then this lit test will be target independent. |
please use the newpm syntax: -passes=simplifycfg