Rationale:
Using the --debug-only flag requires a debug build. Also, the debug output is not always consistent over different builds.
This change avoids all problems by just testing the generated assembly for AVX.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Time | Test | |
---|---|---|
200 ms | lldb-unit.Host/_/HostTests::Unknown Unit Message ("") |
Event Timeline
I don't really understand why? Can you add the motivation in the commit/revision description?
I think because the test is checking the -debug output.
Can we just check the assembly output and trust that asserts builds will trigger the assert that found this originally?
I just found out that this is needed for debug builds. Otherwise the test will fail for optimized builds.
I took inspiration from other files in the same directory, see e.g. merge-store-partially-alias-loads.ll
In this case, testing the assembly would of course work, but it would not be a strict as I wanted it to be.
Given that other tests do exactly this, I figured this was the best-practice for debug output testing.
If there are other best-practices for this, happy to comply...
Hmm, given that some builds now break on using "extract_subvector" instead of "vselect",
I am actually really start to like the suggestion to just test the assembly and rely on
not hitting asserts in builds that support these, but not let the test rely on debug output.
CHECK: v4f64 = vselect
<stdin>:8:40: note: scanning from here
Initial selection DAG: %bb.0 'bug45563:'
<stdin>:41:7: note: possible intended match here
t54: v2f64 = extract_subvector t52, Constant:i64<0
llvm/test/CodeGen/X86/pr45563.ll | ||
---|---|---|
1 | Drop the stderr redirect? |
Drop the stderr redirect?