Skip to content

Commit 397e147

Browse files
iajbarllvmbot
authored andcommitted
[llvm][Hexagon] Promote operand v2i1 to v2i32 (#135409)
Fixes #118879 (cherry picked from commit 32c3909)
1 parent e0db588 commit 397e147

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

llvm/lib/Target/Hexagon/HexagonCallingConv.td

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ def CC_Hexagon: CallingConv<[
6565
CCIfType<[i32],
6666
CCIfSplit<
6767
CCCustom<"CC_SkipOdd">>>,
68+
CCIfType<[v2i1], CCPromoteToType<v2i32>>,
6869
CCIfType<[v4i1], CCPromoteToType<v4i16>>,
6970
CCIfType<[v8i1], CCPromoteToType<v8i8>>,
7071

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
;RUN: llc -mtriple=hexagon < %s | FileCheck %s
2+
3+
; Check that v2i1 type is promoted to v2i32.
4+
; CHECK: call f
5+
; CHECK: r{{[0-9]+}}:{{[0-9]+}} = memd(r29+#8)
6+
7+
define <2 x i1> @test(<2 x i1> %1) {
8+
Entry:
9+
%2 = call <2 x i1> @f(<2 x i1> %1)
10+
ret <2 x i1> %2
11+
12+
}
13+
14+
declare <2 x i1> @f(<2 x i1>)

0 commit comments

Comments
 (0)