This expands the unit test for X86FixupBWInsts.cpp by testing for the expected output
both when the optimization is turned on, and turned off.
Details
Diff Detail
Event Timeline
Sanjay - See if you like this form for testing with fixup-byte-word-insts both on and off. If you prefer this, then I
could make similar changes to the few other tests that are also affected when fixup-byte-word-insts would change
to be turned on by default.
This was one of the options that I suggested in D17173, so I think it's fine to use an additional run on the affected tests.
I'd like to know if Quentin agrees though.
Hi,
Sounds good to me.
Thanks Sanjay for pointing thread out and thanks Kevin for your patient with our requests!
You have a typo in your check lines or command line depending on how you what to fix that though.
See my inline comment.
Cheers,
-Quentin
fixup-bw-inst.ll | ||
---|---|---|
18 | You are actually not checking anything here. -check-prefix BWON will check prefix that starts with BWON. |
LGTM.
A few notes about LLVM testing in general:
- For short codegen tests like these, we've been encouraging the use of utils/update_llc_test_checks.py . It automates the check-line creation, so it would've avoided the bug that Quentin noticed. Feel free to try it here. :) After the script does its work, you can reduce the checks as you'd like...
- But we've been burned by loose regression test checking many times ( https://llvm.org/bugs/show_bug.cgi?id=22897 ). So again, having tighter check lines via the script has benefits...
- But I understand the point you made in D17173 about test maintenance and focused unit tests. It's an engineering trade-off. If you've had to chase down a few miscompiles, I think you lean towards more tests and more checks rather than less. :)
You are actually not checking anything here.
-check-prefix BWON will check prefix that starts with BWON.
If you want CHECK-BWON, you need to use -check-prefix CHECK-BWON.