Skip to content

Conversation

@llvmbot
Copy link
Member

@llvmbot llvmbot commented Apr 12, 2025

Backport 32c3909

Requested by: @androm3da

@llvmbot
Copy link
Member Author

llvmbot commented Apr 12, 2025

@llvm/pr-subscribers-backend-hexagon

Author: None (llvmbot)

Changes

Backport 32c3909

Requested by: @androm3da


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

2 Files Affected:

  • (modified) llvm/lib/Target/Hexagon/HexagonCallingConv.td (+1)
  • (added) llvm/test/CodeGen/Hexagon/calloperand-v2i1.ll (+14)
diff --git a/llvm/lib/Target/Hexagon/HexagonCallingConv.td b/llvm/lib/Target/Hexagon/HexagonCallingConv.td
index 2378bbc928d49..e0302b85fa948 100644
--- a/llvm/lib/Target/Hexagon/HexagonCallingConv.td
+++ b/llvm/lib/Target/Hexagon/HexagonCallingConv.td
@@ -65,6 +65,7 @@ def CC_Hexagon: CallingConv<[
   CCIfType<[i32],
     CCIfSplit<
       CCCustom<"CC_SkipOdd">>>,
+  CCIfType<[v2i1],  CCPromoteToType<v2i32>>,
   CCIfType<[v4i1],  CCPromoteToType<v4i16>>,
   CCIfType<[v8i1],  CCPromoteToType<v8i8>>,
 
diff --git a/llvm/test/CodeGen/Hexagon/calloperand-v2i1.ll b/llvm/test/CodeGen/Hexagon/calloperand-v2i1.ll
new file mode 100644
index 0000000000000..2dcd5fe571e36
--- /dev/null
+++ b/llvm/test/CodeGen/Hexagon/calloperand-v2i1.ll
@@ -0,0 +1,14 @@
+;RUN: llc -mtriple=hexagon  < %s | FileCheck %s
+
+; Check that v2i1 type is promoted to v2i32.
+; CHECK: call f
+; CHECK: r{{[0-9]+}}:{{[0-9]+}} = memd(r29+#8)
+
+define  <2 x i1> @test(<2 x i1> %1) {
+Entry:
+   %2 = call <2 x i1> @f(<2 x i1> %1)
+  ret <2 x i1> %2
+
+  }
+
+declare <2 x i1> @f(<2 x i1>)

@tstellar tstellar moved this from Needs Triage to Needs Review in LLVM Release Status Apr 12, 2025
@tstellar tstellar requested a review from iajbar April 14, 2025 20:06
@tstellar
Copy link
Collaborator

ping @iajbar

Copy link
Contributor

@iajbar iajbar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks.

@github-project-automation github-project-automation bot moved this from Needs Review to Needs Merge in LLVM Release Status Apr 15, 2025
@tstellar tstellar merged commit 86f5891 into llvm:release/20.x Apr 16, 2025
7 of 10 checks passed
@github-project-automation github-project-automation bot moved this from Needs Merge to Done in LLVM Release Status Apr 16, 2025
@github-actions
Copy link

@androm3da (or anyone else). If you would like to add a note about this fix in the release notes (completely optional). Please reply to this comment with a one or two sentence description of the fix. When you are done, please add the release:note label to this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Development

Successfully merging this pull request may close these issues.

3 participants