Skip to content

Commit 338be79

Browse files
committed
[SLP][NFC]Add a test with the incorrect sign extension of first ext
node.
1 parent 7a87902 commit 338be79

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
2+
; RUN: opt -S --passes=slp-vectorizer -mtriple=riscv64-unknown-linux-gnu -mattr="+v" < %s | FileCheck %s
3+
4+
@h = global [16 x i64] zeroinitializer
5+
6+
define void @test() {
7+
; CHECK-LABEL: define void @test(
8+
; CHECK-SAME: ) #[[ATTR0:[0-9]+]] {
9+
; CHECK-NEXT: entry:
10+
; CHECK-NEXT: store <2 x i64> <i64 1, i64 0>, ptr @h, align 8
11+
; CHECK-NEXT: ret void
12+
;
13+
entry:
14+
%sext.0 = sext i8 0 to i32
15+
%sext.1 = sext i8 0 to i32
16+
17+
%lshr.0 = lshr i32 0, %sext.0
18+
%lshr.1 = lshr i32 0, %sext.1
19+
20+
%or.0 = or i32 %lshr.0, -1
21+
%or.1 = or i32 %lshr.1, 0
22+
23+
%zext.0 = zext i32 %or.0 to i64
24+
%zext.1 = zext i32 %or.1 to i64
25+
26+
store i64 %zext.0, ptr @h, align 8
27+
store i64 %zext.1, ptr getelementptr inbounds ([16 x i64], ptr @h, i64 0, i64 1), align 8
28+
ret void
29+
}

0 commit comments

Comments
 (0)