-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: Fix x86 tests to use -mtriple=x86_64-unknown-linux-gnu #2555
base: main
Are you sure you want to change the base?
Conversation
cc: @AlexeySotkin |
Looks like Alexey is no longer working on SPIR-V. Maybe @MrSidims can offer some advice. |
I talked with Alexey and he explained how this works to me and pointed me to https://llvm.org/docs/CommandGuide/FileCheck.html#the-filecheck-check-prefix-option Now that I understand a little bit better, I think I've recognized what the real problem is: these tests compile some AFAIU, Does this make sense? |
@mattst88 thanks for the contribution! We can either put something like REQUIRES: X86-64 or create a check logic depending on the architecture. I just returned from a vacation and will take a look throughout the day at the problem and suggest the appropriate changes. |
@mattst88 agree, mtriple should be not %triple in this case. Instead it should be either x86_64-unknown-linux-gnu with the CHECK lines remain to be as is or instead RUN strings be duplicated having both 32 and 64 bit triples with the appropriate FileChecks to be I would ask you to just set triple -mtriple=x86_64-unknown-linux-gnu in this PR and if necessary we extend the testing on our own. |
fac9d63
to
4e5f6aa
Compare
The updated PR works for me on SPIRV-LLVM-Translator 17 and 18.1. It was generated by sed -i -e 's/%triple/x86_64-unknown-linux-gnu/' \
test/DebugInfo/X86/dbg-declare-alloca.ll \
test/DebugInfo/X86/dbg-declare-arg.ll \
test/DebugInfo/X86/dbg-value-const-byref.ll \
test/DebugInfo/X86/dw_op_minus_direct.ll \
test/DebugInfo/X86/dwarf-aranges-no-dwarf-labels.ll \
test/DebugInfo/X86/frame-register.ll \
test/DebugInfo/X86/this-stack_value.ll |
That was enough to make the whole test suite pass on x86-32, but there are still failures when running it on other platforms like aarch64. Looks like Should I update the PR to do that? |
4e5f6aa
to
1d35ff9
Compare
Speculatively updated. |
... when test expects x86_64-specific results.
1d35ff9
to
96a37c6
Compare
These tests fail on 32-bit x86:
The causes are all pretty simple differences from the x86-64 expectations in the tests today. E.g.:
Or
With these expectation updates, the test suite passes on x86-32:
However, I do not know how to conditionalize the
CHECK
/CHECK-NEXT
/DWARF
/DWARF-NEXT
statements. I found that some tests in LLVM useX86
/X86-NEXT
/X64
/X64-NEXT
statements, but I do not understand things well enough to use them in these tests. This is where I need help.