This is to avoid e.g. merging two cheap icmps if the target is not going to expand to something nice later.
Details
Diff Detail
- Build Status
Buildable 10831 Build 10831: arc lint + arc unit
Event Timeline
lib/Transforms/Scalar/MergeICmps.cpp | ||
---|---|---|
45–46 | Remove rather than comment out? | |
614 | formatting - more spacious. | |
test/Transforms/MergeICmps/pair-int32-int32.ll | ||
1–2 | I suspect (because I've done it a few times myself!) that these tests are going to fail on bots that don't build the x86 target. I think you'll need to create target-specific subdirectories for these tests and split them up into target-independent and target-required RUNs. You can probably use the test structure under tests/Transforms/SimplifyCFG as a model for how it needs to be done. |
Thanks, PTAL.
test/Transforms/MergeICmps/pair-int32-int32.ll | ||
---|---|---|
1–2 | Thanks for the pointer ! |
lib/Transforms/Scalar/MergeICmps.cpp | ||
---|---|---|
581–583 | The indentation is non-standard; you should run clang-format before this patch to cleanup. | |
614 | Sorry - that comment wasn't clear. I meant there should be a space after 'if': if(!TTI... should be: if (!TTI... | |
test/Transforms/MergeICmps/X86/pair-int32-int32.ll | ||
1–2 | Here and in the other test files, you should prefer to read the input from file rather than specify a file name as param: The benefit is that if you let 'opt' know the filename, it could potentially print that name and the path to that file as part of some debug string. Now if that string happens to match a CHECK line or (more likely) that string happens to match a CHECK-NOT line, the test will fail for that user. This leads to seemingly random test failures and causes great suffering. This is another reason to prefer complete auto-generation of the CHECK lines using the script at 'utils/update_test_checks.py'. It doesn't generate 'NOT' lines, so there's less risk of hard-to-debug test failure. | |
40–41 | Here and in the other files, I don't think this is working as you expected. If you specify a '--check-prefix', then generic 'CHECK' is no longer used for that RUN. You should make this 'X86-LABEL' in this case. |
Thanks, PTAL.
lib/Transforms/Scalar/MergeICmps.cpp | ||
---|---|---|
581–583 | I don't know why, but clang-format keeps indenting "public" and "private" to one space (even after I fix these manually). Anything I missed ? | |
test/Transforms/MergeICmps/X86/pair-int32-int32.ll | ||
1–2 | Thanks for the comments. I've regenerated the tests with 'utils/update_test_checks.py'. |
LGTM.
lib/Transforms/Scalar/MergeICmps.cpp | ||
---|---|---|
581–583 | Strange - when I run clang-format locally, it puts the 'public' at the left edge (no indent). Oh well, it was just a nit. :) |
Remove rather than comment out?