@@ -1715,14 +1715,26 @@ unsupported {} from `{}` with element `{}` of size `{}` to `{}`"#,
17151715 let ( in_style, in_width) = match in_elem. kind ( ) {
17161716 // vectors of pointer-sized integers should've been
17171717 // disallowed before here, so this unwrap is safe.
1718- ty:: Int ( i) => ( Style :: Int ( true ) , i. bit_width ( ) . unwrap ( ) ) ,
1719- ty:: Uint ( u) => ( Style :: Int ( false ) , u. bit_width ( ) . unwrap ( ) ) ,
1718+ ty:: Int ( i) => (
1719+ Style :: Int ( true ) ,
1720+ i. normalize ( bx. tcx ( ) . sess . target . pointer_width ) . bit_width ( ) . unwrap ( ) ,
1721+ ) ,
1722+ ty:: Uint ( u) => (
1723+ Style :: Int ( false ) ,
1724+ u. normalize ( bx. tcx ( ) . sess . target . pointer_width ) . bit_width ( ) . unwrap ( ) ,
1725+ ) ,
17201726 ty:: Float ( f) => ( Style :: Float , f. bit_width ( ) ) ,
17211727 _ => ( Style :: Unsupported , 0 ) ,
17221728 } ;
17231729 let ( out_style, out_width) = match out_elem. kind ( ) {
1724- ty:: Int ( i) => ( Style :: Int ( true ) , i. bit_width ( ) . unwrap ( ) ) ,
1725- ty:: Uint ( u) => ( Style :: Int ( false ) , u. bit_width ( ) . unwrap ( ) ) ,
1730+ ty:: Int ( i) => (
1731+ Style :: Int ( true ) ,
1732+ i. normalize ( bx. tcx ( ) . sess . target . pointer_width ) . bit_width ( ) . unwrap ( ) ,
1733+ ) ,
1734+ ty:: Uint ( u) => (
1735+ Style :: Int ( false ) ,
1736+ u. normalize ( bx. tcx ( ) . sess . target . pointer_width ) . bit_width ( ) . unwrap ( ) ,
1737+ ) ,
17261738 ty:: Float ( f) => ( Style :: Float , f. bit_width ( ) ) ,
17271739 _ => ( Style :: Unsupported , 0 ) ,
17281740 } ;
0 commit comments