33
44; PR129363
55
6+ ; ext split from i32 to i128
67define i128 @i128_ext_split (i32 noundef %x ) {
78; CHECK-LABEL: define i128 @i128_ext_split(
89; CHECK-SAME: i32 noundef [[X:%.*]]) {
@@ -19,6 +20,7 @@ define i128 @i128_ext_split(i32 noundef %x) {
1920 ret i128 %x.sroa.0.0.insert.insert.i
2021}
2122
23+ ; ext split from i32 to i128
2224define void @i128_ext_split_store (i32 %x , ptr %out ) {
2325; CHECK-LABEL: define void @i128_ext_split_store(
2426; CHECK-SAME: i32 [[X:%.*]], ptr [[OUT:%.*]]) {
@@ -40,3 +42,49 @@ entry:
4042 store i128 %res , ptr %out , align 16
4143 ret void
4244}
45+
46+ ; ext split from i16 to i64
47+ define void @i64_ext_split_store (i16 %x , ptr %out ) {
48+ ; CHECK-LABEL: define void @i64_ext_split_store(
49+ ; CHECK-SAME: i16 [[X:%.*]], ptr [[OUT:%.*]]) {
50+ ; CHECK-NEXT: [[ENTRY:.*:]]
51+ ; CHECK-NEXT: [[RES:%.*]] = sext i16 [[X]] to i64
52+ ; CHECK-NEXT: store i64 [[RES]], ptr [[OUT]], align 16
53+ ; CHECK-NEXT: ret void
54+ ;
55+ entry:
56+ %LowerSrc = sext i16 %x to i32
57+ %lo = zext i32 %LowerSrc to i64
58+
59+ %sign = ashr i16 %x , 15
60+ %UpperSrc = sext i16 %sign to i32
61+ %widen = zext i32 %UpperSrc to i64
62+ %hi = shl nuw i64 %widen , 32
63+
64+ %res = or disjoint i64 %hi , %lo
65+ store i64 %res , ptr %out , align 16
66+ ret void
67+ }
68+
69+ ; ext split from i16 to i128
70+ define void @i128_ext_split_store_i16 (i16 %x , ptr %out ) {
71+ ; CHECK-LABEL: define void @i128_ext_split_store_i16(
72+ ; CHECK-SAME: i16 [[X:%.*]], ptr [[OUT:%.*]]) {
73+ ; CHECK-NEXT: [[ENTRY:.*:]]
74+ ; CHECK-NEXT: [[RES:%.*]] = sext i16 [[X]] to i128
75+ ; CHECK-NEXT: store i128 [[RES]], ptr [[OUT]], align 16
76+ ; CHECK-NEXT: ret void
77+ ;
78+ entry:
79+ %LowerSrc = sext i16 %x to i64
80+ %lo = zext i64 %LowerSrc to i128
81+
82+ %sign = ashr i16 %x , 15
83+ %UpperSrc = sext i16 %sign to i64
84+ %widen = zext i64 %UpperSrc to i128
85+ %hi = shl nuw i128 %widen , 64
86+
87+ %res = or disjoint i128 %hi , %lo
88+ store i128 %res , ptr %out , align 16
89+ ret void
90+ }
0 commit comments