[llvm] [ORC] Add signext on @sum() arguments in test. (PR #113308)
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 28 15:41:01 PDT 2024
================
@@ -90,6 +90,35 @@ class OrcCAPITestBase : public testing::Test {
LLVMOrcDisposeLLJIT(J);
TargetSupported = true;
+
+ // Create test functions in text format, with the proper extension
+ // attributes.
+ if (SumExample.empty()) {
+ std::string I32RetExt = "";
+ std::string I32ArgExt = "";
+ if (StringRef(TargetTriple).starts_with("s390x-ibm-linux"))
+ I32RetExt = I32ArgExt = "signext ";
----------------
lhames wrote:
Is there a way that we could move this out into a common header location that could be used elsewhere in LLVM, or at least in the tests?
E.g.
```c++
StringRef getExtension(const Triple &TT) {
switch (TT.getArch()) {
case Triple::s390x:
if (TT.getVendor() == Triple::IBM && TT.getOS() == Triple::Linux)
return "signext ";
break;
default:
break;
}
return "";
}
```
I'm guessing that we'll need this for Kaleidoscope and some other examples and tests too?
https://github.com/llvm/llvm-project/pull/113308
More information about the llvm-commits
mailing list