-
Notifications
You must be signed in to change notification settings - Fork 15.1k
[Clang][ARM] Fix tests using thumb instead arm arch on cc1 #166416
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
[Clang][ARM] Fix tests using thumb instead arm arch on cc1 #166416
Conversation
|
@llvm/pr-subscribers-clang Author: Tomer Shafir (tomershafir) ChangesCurrently, the ARM backend incorrectly parses every As a quick triage, this change switches the test to use Uncovered by #151404 Full diff: https://github.com/llvm/llvm-project/pull/166416.diff 1 Files Affected:
diff --git a/clang/test/CodeGen/pr45476.cpp b/clang/test/CodeGen/pr45476.cpp
index c95f7fb8cd9c3..3a67904a8e568 100644
--- a/clang/test/CodeGen/pr45476.cpp
+++ b/clang/test/CodeGen/pr45476.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple armv6m-eabi -emit-llvm %s -o - | FileCheck -check-prefix=LIBCALL %s
+// RUN: %clang_cc1 -triple thumbv6m-eabi -emit-llvm %s -o - | FileCheck -check-prefix=LIBCALL %s
// RUN: %clang_cc1 -triple armv8-eabi -emit-llvm %s -o - | FileCheck -check-prefix=NATIVE %s
// PR45476
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused what, exactly, this is fixing.
We're explicitly specifying the triple, so the host triple shouldn't matter. And this test is currently passing on every buildbot. So what does this do?
It's true that the test passes, because it only goes as far as LLVM IR, compiling the affected test file using If you run the clang driver, rather than So I agree that it looks as if |
|
In a quick grep of the clang tests I can see a total of 9 cases where @tomershafir, if you want to fix all 9 of those instead of just one, on the basis that that way the direct cc1 invocations more closely match what the driver would have done, I'd approve it. |
Currently, the ARM backend incorrectly parses every `arm` prefixed arch to be non-thumb, but `armv6m` is THUMB and doesnt have ARM ops causing the test to fail when compiling to assembly and not LLVM IR: `error: Function 'foo' uses ARM instructions, but the target does not support ARM mode execution.` This only happens when invoking cc1 directly and not the Clang driver. As a quick triage, this patch changes the tests to use `thumb`. Uncovered by llvm#151404
8d3b939 to
f7a407e
Compare
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/168/builds/16884 Here is the relevant piece of the build log for the reference |
Currently, the ARM backend incorrectly parses every
armprefixed arch to be non-thumb, butarmv6mis THUMB and doesnt have ARM ops causing the test to fail when compiling to assembly and not LLVM IR:error: Function 'foo' uses ARM instructions, but the target does not support ARM mode execution.This only happens when invoking cc1 directly and not the Clang driver.As a quick triage, this patch changes the tests to use
thumb.Uncovered by #151404