File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -702,17 +702,11 @@ def _bitwise_binary_shape(a_shape, b_shape):
702
702
if self .operator in ("&" , "^" , "|" ):
703
703
return _bitwise_binary_shape (* op_shapes )
704
704
if self .operator == "<<" :
705
- if b_signed :
706
- extra = 2 ** (b_width - 1 ) - 1
707
- else :
708
- extra = 2 ** (b_width ) - 1
709
- return Shape (a_width + extra , a_signed )
705
+ assert not b_signed
706
+ return Shape (a_width + 2 ** b_width - 1 , a_signed )
710
707
if self .operator == ">>" :
711
- if b_signed :
712
- extra = 2 ** (b_width - 1 )
713
- else :
714
- extra = 0
715
- return Shape (a_width + extra , a_signed )
708
+ assert not b_signed
709
+ return Shape (a_width , a_signed )
716
710
elif len (op_shapes ) == 3 :
717
711
if self .operator == "m" :
718
712
s_shape , a_shape , b_shape = op_shapes
You can’t perform that action at this time.
0 commit comments