Skip to content

Commit c4cc2e3

Browse files
committed
Change name to simd_funnel_sh{l,r} (TODO squash later)
1 parent 33fe1ce commit c4cc2e3

File tree

7 files changed

+35
-35
lines changed

7 files changed

+35
-35
lines changed

compiler/rustc_codegen_llvm/src/intrinsic.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2525,11 +2525,11 @@ fn generic_simd_intrinsic<'ll, 'tcx>(
25252525
return Ok(v);
25262526
}
25272527

2528-
if name == sym::simd_fshr || name == sym::simd_fshl {
2528+
if name == sym::simd_funnel_shr || name == sym::simd_funnel_shl {
25292529
let a = args[0].immediate();
25302530
let b = args[1].immediate();
25312531
let shift = args[2].immediate();
2532-
let is_left = name == sym::simd_fshl;
2532+
let is_left = name == sym::simd_funnel_shl;
25332533
let ptr_bits = bx.tcx().data_layout.pointer_size.bits();
25342534

25352535
let elem_width = match *in_elem.kind() {

compiler/rustc_hir_analysis/src/check/intrinsic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ pub(crate) fn check_intrinsic_type(
661661
| sym::simd_round
662662
| sym::simd_round_ties_even
663663
| sym::simd_trunc => (1, 0, vec![param(0)], param(0)),
664-
sym::simd_fma | sym::simd_relaxed_fma | sym::simd_fshl | sym::simd_fshr => {
664+
sym::simd_fma | sym::simd_relaxed_fma | sym::simd_funnel_shl | sym::simd_funnel_shr => {
665665
(1, 0, vec![param(0), param(0), param(0)], param(0))
666666
}
667667
sym::simd_gather => (3, 0, vec![param(0), param(1), param(2)], param(0)),

compiler/rustc_span/src/symbol.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1947,10 +1947,10 @@ symbols! {
19471947
simd_fma,
19481948
simd_fmax,
19491949
simd_fmin,
1950-
simd_fshl,
1951-
simd_fshr,
19521950
simd_fsin,
19531951
simd_fsqrt,
1952+
simd_funnel_shl,
1953+
simd_funnel_shr,
19541954
simd_gather,
19551955
simd_ge,
19561956
simd_gt,

library/core/src/intrinsics/simd.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ pub unsafe fn simd_shr<T>(lhs: T, rhs: T) -> T;
141141
/// Each element of `shift` must be less than `<int>::BITS`.
142142
#[rustc_intrinsic]
143143
#[rustc_nounwind]
144-
pub unsafe fn simd_fshl<T>(a: T, b: T, shift: T) -> T;
144+
pub unsafe fn simd_funnel_shl<T>(a: T, b: T, shift: T) -> T;
145145

146146
/// Funnel Shifts vector right elementwise, with UB on overflow.
147147
///
@@ -158,7 +158,7 @@ pub unsafe fn simd_fshl<T>(a: T, b: T, shift: T) -> T;
158158
/// Each element of `shift` must be less than `<int>::BITS`.
159159
#[rustc_intrinsic]
160160
#[rustc_nounwind]
161-
pub unsafe fn simd_fshr<T>(a: T, b: T, shift: T) -> T;
161+
pub unsafe fn simd_funnel_shr<T>(a: T, b: T, shift: T) -> T;
162162

163163
/// "Ands" vectors elementwise.
164164
///

tests/ui/simd/intrinsic/generic-arithmetic-2.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ fn main() {
4343
simd_shl(y, y);
4444
simd_shr(x, x);
4545
simd_shr(y, y);
46-
simd_fshl(x, x, x);
47-
simd_fshl(y, y, y);
48-
simd_fshr(x, x, x);
49-
simd_fshr(y, y, y);
46+
simd_funnel_shl(x, x, x);
47+
simd_funnel_shl(y, y, y);
48+
simd_funnel_shr(x, x, x);
49+
simd_funnel_shr(y, y, y);
5050
simd_and(x, x);
5151
simd_and(y, y);
5252
simd_or(x, x);
@@ -77,9 +77,9 @@ fn main() {
7777
//~^ ERROR expected SIMD input type, found non-SIMD `i32`
7878
simd_shr(0, 0);
7979
//~^ ERROR expected SIMD input type, found non-SIMD `i32`
80-
simd_fshl(0, 0, 0);
80+
simd_funnel_shl(0, 0, 0);
8181
//~^ ERROR expected SIMD input type, found non-SIMD `i32`
82-
simd_fshr(0, 0, 0);
82+
simd_funnel_shr(0, 0, 0);
8383
//~^ ERROR expected SIMD input type, found non-SIMD `i32`
8484
simd_and(0, 0);
8585
//~^ ERROR expected SIMD input type, found non-SIMD `i32`
@@ -103,9 +103,9 @@ fn main() {
103103
//~^ ERROR unsupported operation on `f32x4` with element `f32`
104104
simd_shr(z, z);
105105
//~^ ERROR unsupported operation on `f32x4` with element `f32`
106-
simd_fshl(z, z, z);
106+
simd_funnel_shl(z, z, z);
107107
//~^ ERROR unsupported operation on `f32x4` with element `f32`
108-
simd_fshr(z, z, z);
108+
simd_funnel_shr(z, z, z);
109109
//~^ ERROR unsupported operation on `f32x4` with element `f32`
110110
simd_and(z, z);
111111
//~^ ERROR unsupported operation on `f32x4` with element `f32`

tests/ui/simd/intrinsic/generic-arithmetic-2.stderr

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,17 @@ error[E0511]: invalid monomorphization of `simd_shr` intrinsic: expected SIMD in
3434
LL | simd_shr(0, 0);
3535
| ^^^^^^^^^^^^^^
3636

37-
error[E0511]: invalid monomorphization of `simd_fshl` intrinsic: expected SIMD input type, found non-SIMD `i32`
37+
error[E0511]: invalid monomorphization of `simd_funnel_shl` intrinsic: expected SIMD input type, found non-SIMD `i32`
3838
--> $DIR/generic-arithmetic-2.rs:80:9
3939
|
40-
LL | simd_fshl(0, 0, 0);
41-
| ^^^^^^^^^^^^^^^^^^
40+
LL | simd_funnel_shl(0, 0, 0);
41+
| ^^^^^^^^^^^^^^^^^^^^^^^^
4242

43-
error[E0511]: invalid monomorphization of `simd_fshr` intrinsic: expected SIMD input type, found non-SIMD `i32`
43+
error[E0511]: invalid monomorphization of `simd_funnel_shr` intrinsic: expected SIMD input type, found non-SIMD `i32`
4444
--> $DIR/generic-arithmetic-2.rs:82:9
4545
|
46-
LL | simd_fshr(0, 0, 0);
47-
| ^^^^^^^^^^^^^^^^^^
46+
LL | simd_funnel_shr(0, 0, 0);
47+
| ^^^^^^^^^^^^^^^^^^^^^^^^
4848

4949
error[E0511]: invalid monomorphization of `simd_and` intrinsic: expected SIMD input type, found non-SIMD `i32`
5050
--> $DIR/generic-arithmetic-2.rs:84:9
@@ -106,17 +106,17 @@ error[E0511]: invalid monomorphization of `simd_shr` intrinsic: unsupported oper
106106
LL | simd_shr(z, z);
107107
| ^^^^^^^^^^^^^^
108108

109-
error[E0511]: invalid monomorphization of `simd_fshl` intrinsic: unsupported operation on `f32x4` with element `f32`
109+
error[E0511]: invalid monomorphization of `simd_funnel_shl` intrinsic: unsupported operation on `f32x4` with element `f32`
110110
--> $DIR/generic-arithmetic-2.rs:106:9
111111
|
112-
LL | simd_fshl(z, z, z);
113-
| ^^^^^^^^^^^^^^^^^^
112+
LL | simd_funnel_shl(z, z, z);
113+
| ^^^^^^^^^^^^^^^^^^^^^^^^
114114

115-
error[E0511]: invalid monomorphization of `simd_fshr` intrinsic: unsupported operation on `f32x4` with element `f32`
115+
error[E0511]: invalid monomorphization of `simd_funnel_shr` intrinsic: unsupported operation on `f32x4` with element `f32`
116116
--> $DIR/generic-arithmetic-2.rs:108:9
117117
|
118-
LL | simd_fshr(z, z, z);
119-
| ^^^^^^^^^^^^^^^^^^
118+
LL | simd_funnel_shr(z, z, z);
119+
| ^^^^^^^^^^^^^^^^^^^^^^^^
120120

121121
error[E0511]: invalid monomorphization of `simd_and` intrinsic: unsupported operation on `f32x4` with element `f32`
122122
--> $DIR/generic-arithmetic-2.rs:110:9

tests/ui/simd/intrinsic/generic-arithmetic-pass.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ fn main() {
8484
all_eq!(simd_shr(simd_shl(y2, y1), y1), y2);
8585

8686
all_eq!(
87-
simd_fshl(x1, x2, x1),
87+
simd_funnel_shl(x1, x2, x1),
8888
i32x4([
8989
(1 << 1) | (2 >> 31),
9090
(2 << 2) | (3 >> 30),
@@ -93,7 +93,7 @@ fn main() {
9393
])
9494
);
9595
all_eq!(
96-
simd_fshl(x2, x1, x1),
96+
simd_funnel_shl(x2, x1, x1),
9797
i32x4([
9898
(2 << 1) | (1 >> 31),
9999
(3 << 2) | (2 >> 30),
@@ -102,7 +102,7 @@ fn main() {
102102
])
103103
);
104104
all_eq!(
105-
simd_fshl(y1, y2, y1),
105+
simd_funnel_shl(y1, y2, y1),
106106
U32::<4>([
107107
(1 << 1) | (2 >> 31),
108108
(2 << 2) | (3 >> 30),
@@ -111,7 +111,7 @@ fn main() {
111111
])
112112
);
113113
all_eq!(
114-
simd_fshl(y2, y1, y1),
114+
simd_funnel_shl(y2, y1, y1),
115115
U32::<4>([
116116
(2 << 1) | (1 >> 31),
117117
(3 << 2) | (2 >> 30),
@@ -121,7 +121,7 @@ fn main() {
121121
);
122122

123123
all_eq!(
124-
simd_fshr(x1, x2, x1),
124+
simd_funnel_shr(x1, x2, x1),
125125
i32x4([
126126
(1 << 31) | (2 >> 1),
127127
(2 << 30) | (3 >> 2),
@@ -130,7 +130,7 @@ fn main() {
130130
])
131131
);
132132
all_eq!(
133-
simd_fshr(x2, x1, x1),
133+
simd_funnel_shr(x2, x1, x1),
134134
i32x4([
135135
(2 << 31) | (1 >> 1),
136136
(3 << 30) | (2 >> 2),
@@ -139,7 +139,7 @@ fn main() {
139139
])
140140
);
141141
all_eq!(
142-
simd_fshr(y1, y2, y1),
142+
simd_funnel_shr(y1, y2, y1),
143143
U32::<4>([
144144
(1 << 31) | (2 >> 1),
145145
(2 << 30) | (3 >> 2),
@@ -148,7 +148,7 @@ fn main() {
148148
])
149149
);
150150
all_eq!(
151-
simd_fshr(y2, y1, y1),
151+
simd_funnel_shr(y2, y1, y1),
152152
U32::<4>([
153153
(2 << 31) | (1 >> 1),
154154
(3 << 30) | (2 >> 2),

0 commit comments

Comments
 (0)