Skip to content

[LoongArch][Clang] Add tests for #110834 #114509

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

Merged
merged 1 commit into from
Nov 2, 2024

Conversation

xry111
Copy link
Contributor

@xry111 xry111 commented Nov 1, 2024

No description provided.

@llvmbot llvmbot added the clang Clang issues not falling into any other category label Nov 1, 2024
@llvmbot
Copy link
Member

llvmbot commented Nov 1, 2024

@llvm/pr-subscribers-clang

Author: Xi Ruoyao (xry111)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/114509.diff

2 Files Affected:

  • (added) clang/test/Headers/lasxintrin.c (+6)
  • (added) clang/test/Headers/lsxintrin.c (+6)
diff --git a/clang/test/Headers/lasxintrin.c b/clang/test/Headers/lasxintrin.c
new file mode 100644
index 00000000000000..530b72a7e3eb73
--- /dev/null
+++ b/clang/test/Headers/lasxintrin.c
@@ -0,0 +1,6 @@
+// REQUIRES: loongarch-registered-target
+// RUN: %clang_cc1 %s -fsyntax-only -triple loongarch64-linux -target-feature +lasx
+// RUN: %clang_cc1 %s -fsyntax-only -triple loongarch64-linux -target-feature +lasx -flax-vector-conversions=none
+// RUN: %clang_cc1 %s -fsyntax-only -triple loongarch64-linux -target-feature +lasx -flax-vector-conversions=none -fno-signed-char
+
+#include <lasxintrin.h>
diff --git a/clang/test/Headers/lsxintrin.c b/clang/test/Headers/lsxintrin.c
new file mode 100644
index 00000000000000..d9ac76b5543c12
--- /dev/null
+++ b/clang/test/Headers/lsxintrin.c
@@ -0,0 +1,6 @@
+// REQUIRES: loongarch-registered-target
+// RUN: %clang_cc1 %s -fsyntax-only -triple loongarch64-linux -target-feature +lsx
+// RUN: %clang_cc1 %s -fsyntax-only -triple loongarch64-linux -target-feature +lsx -flax-vector-conversions=none
+// RUN: %clang_cc1 %s -fsyntax-only -triple loongarch64-linux -target-feature +lsx -flax-vector-conversions=none -fno-signed-char
+
+#include <lsxintrin.h>

@xry111 xry111 force-pushed the xry111/fix-110834-01-tests branch from 1bbbc1c to dd6a7a7 Compare November 1, 2024 10:01
@SixWeining SixWeining merged commit 96d2196 into llvm:main Nov 2, 2024
8 checks passed
SixWeining pushed a commit that referenced this pull request Nov 2, 2024
…s for LSX and LASX builtins (#114510)

`-flax-vector-conversions=none` does not allow an implicit conversion
from `signed char` vector to `char` vector, and we cannot remove
`signed`
from `v16i8` or `v32i8` because doing so will break our expectation with
`-fno-signed-char`.  So to make lsxintrin.h and lasxintrin.h work fine
with `-flax-vector-conversions=none`, we must use `signed char` instead
of `char`.
    
The change is just done via
    
    sed 's/V16c/V16Sc/g' -i BuiltinsLoongArchLSX.def
    sed 's/V32c/V32Sc/g' -i BuiltinsLoongArchLASX.def

Depends on #114509.  Part of #110834 fix.
smallp-o-p pushed a commit to smallp-o-p/llvm-project that referenced this pull request Nov 3, 2024
smallp-o-p pushed a commit to smallp-o-p/llvm-project that referenced this pull request Nov 3, 2024
…s for LSX and LASX builtins (llvm#114510)

`-flax-vector-conversions=none` does not allow an implicit conversion
from `signed char` vector to `char` vector, and we cannot remove
`signed`
from `v16i8` or `v32i8` because doing so will break our expectation with
`-fno-signed-char`.  So to make lsxintrin.h and lasxintrin.h work fine
with `-flax-vector-conversions=none`, we must use `signed char` instead
of `char`.
    
The change is just done via
    
    sed 's/V16c/V16Sc/g' -i BuiltinsLoongArchLSX.def
    sed 's/V32c/V32Sc/g' -i BuiltinsLoongArchLASX.def

Depends on llvm#114509.  Part of llvm#110834 fix.
NoumanAmir657 pushed a commit to NoumanAmir657/llvm-project that referenced this pull request Nov 4, 2024
NoumanAmir657 pushed a commit to NoumanAmir657/llvm-project that referenced this pull request Nov 4, 2024
…s for LSX and LASX builtins (llvm#114510)

`-flax-vector-conversions=none` does not allow an implicit conversion
from `signed char` vector to `char` vector, and we cannot remove
`signed`
from `v16i8` or `v32i8` because doing so will break our expectation with
`-fno-signed-char`.  So to make lsxintrin.h and lasxintrin.h work fine
with `-flax-vector-conversions=none`, we must use `signed char` instead
of `char`.
    
The change is just done via
    
    sed 's/V16c/V16Sc/g' -i BuiltinsLoongArchLSX.def
    sed 's/V32c/V32Sc/g' -i BuiltinsLoongArchLASX.def

Depends on llvm#114509.  Part of llvm#110834 fix.
tru pushed a commit to llvmbot/llvm-project that referenced this pull request Nov 12, 2024
tru pushed a commit to llvmbot/llvm-project that referenced this pull request Nov 12, 2024
…s for LSX and LASX builtins (llvm#114510)

`-flax-vector-conversions=none` does not allow an implicit conversion
from `signed char` vector to `char` vector, and we cannot remove
`signed`
from `v16i8` or `v32i8` because doing so will break our expectation with
`-fno-signed-char`.  So to make lsxintrin.h and lasxintrin.h work fine
with `-flax-vector-conversions=none`, we must use `signed char` instead
of `char`.

The change is just done via

    sed 's/V16c/V16Sc/g' -i BuiltinsLoongArchLSX.def
    sed 's/V32c/V32Sc/g' -i BuiltinsLoongArchLASX.def

Depends on llvm#114509.  Part of llvm#110834 fix.

(cherry picked from commit b885054)
tru pushed a commit to llvmbot/llvm-project that referenced this pull request Nov 15, 2024
tru pushed a commit to llvmbot/llvm-project that referenced this pull request Nov 15, 2024
…s for LSX and LASX builtins (llvm#114510)

`-flax-vector-conversions=none` does not allow an implicit conversion
from `signed char` vector to `char` vector, and we cannot remove
`signed`
from `v16i8` or `v32i8` because doing so will break our expectation with
`-fno-signed-char`.  So to make lsxintrin.h and lasxintrin.h work fine
with `-flax-vector-conversions=none`, we must use `signed char` instead
of `char`.

The change is just done via

    sed 's/V16c/V16Sc/g' -i BuiltinsLoongArchLSX.def
    sed 's/V32c/V32Sc/g' -i BuiltinsLoongArchLASX.def

Depends on llvm#114509.  Part of llvm#110834 fix.

(cherry picked from commit b885054)
nikic pushed a commit to rust-lang/llvm-project that referenced this pull request Nov 20, 2024
nikic pushed a commit to rust-lang/llvm-project that referenced this pull request Nov 20, 2024
…s for LSX and LASX builtins (llvm#114510)

`-flax-vector-conversions=none` does not allow an implicit conversion
from `signed char` vector to `char` vector, and we cannot remove
`signed`
from `v16i8` or `v32i8` because doing so will break our expectation with
`-fno-signed-char`.  So to make lsxintrin.h and lasxintrin.h work fine
with `-flax-vector-conversions=none`, we must use `signed char` instead
of `char`.

The change is just done via

    sed 's/V16c/V16Sc/g' -i BuiltinsLoongArchLSX.def
    sed 's/V32c/V32Sc/g' -i BuiltinsLoongArchLASX.def

Depends on llvm#114509.  Part of llvm#110834 fix.

(cherry picked from commit b885054)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants