[PATCH] D25532: [GlobalISel] Get the AArch64 tests to work on Linux

Diana Picus via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 12 22:58:05 PDT 2016


rovka added a comment.

In https://reviews.llvm.org/D25532#568656, @t.p.northover wrote:

> Certainly worth a try. Historically I've found generic-OS tests more trouble than they're worth, but I suppose we can sort that if they really do become a problem.


I just thought generic is better because it makes it easier to move to a new platform - you start by running the tests on it and fixing what breaks. Plus it doesn't add extra time to the tests, you just ensure coverage by adding more buildbots.
You probably have a better feel for this, so I don't mind changing to two run lines (one for iOS and one for Linux) if you think that's better.



================
Comment at: test/CodeGen/AArch64/GlobalISel/arm64-instructionselect.mir:1
-# RUN: llc -O0 -run-pass=instruction-select -verify-machineinstrs -global-isel %s -o - | FileCheck %s
+# RUN: llc -O0 -mtriple=aarch64-apple-ios -run-pass=instruction-select -verify-machineinstrs -global-isel %s -o - | FileCheck %s -check-prefix=CHECK -check-prefix=IOS
+# RUN: llc -O0 -mtriple=aarch64-linux-gnu -run-pass=instruction-select -verify-machineinstrs -global-isel %s -o - | FileCheck %s -check-prefix=CHECK -check-prefix=LINUX
----------------
t.p.northover wrote:
> It'd be better to specify `-relocation-model=pic` which should make sure the GOT gets used on Linux too. Hopefully that won't change anything else in this test.
Ok, thanks, I'll give it a try. Stay tuned.


================
Comment at: unittests/CodeGen/GlobalISel/CMakeLists.txt:3
   GlobalISel
+  CodeGen
   )
----------------
t.p.northover wrote:
> qcolombet wrote:
> > That change shouldn't be part of this patch, should it?
> I expect it's intentional. The linker on Linux has different name-resolution rules from macOS, I wouldn't be at all surprised if the unittest failed to link there without this line.
Yup, it doesn't link without this. This might be a bug in the way our CMake files handle components, but I don't really know enough about our build system to tell.
@beanz : What do you think?


https://reviews.llvm.org/D25532





More information about the llvm-commits mailing list