@@ -1627,7 +1627,7 @@ pub fn numberMin(lhs: Value, rhs: Value, zcu: *Zcu) Value {
1627
1627
};
1628
1628
}
1629
1629
1630
- /// operands must be (vectors of) integers; handles undefined scalars.
1630
+ /// operands must be (vectors of) integers or bools ; handles undefined scalars.
1631
1631
pub fn bitwiseNot (val : Value , ty : Type , arena : Allocator , pt : Zcu.PerThread ) ! Value {
1632
1632
const zcu = pt .zcu ;
1633
1633
if (ty .zigTypeTag (zcu ) == .vector ) {
@@ -1645,7 +1645,7 @@ pub fn bitwiseNot(val: Value, ty: Type, arena: Allocator, pt: Zcu.PerThread) !Va
1645
1645
return bitwiseNotScalar (val , ty , arena , pt );
1646
1646
}
1647
1647
1648
- /// operands must be integers; handles undefined.
1648
+ /// operands must be integers or bools ; handles undefined.
1649
1649
pub fn bitwiseNotScalar (val : Value , ty : Type , arena : Allocator , pt : Zcu.PerThread ) ! Value {
1650
1650
const zcu = pt .zcu ;
1651
1651
if (val .isUndef (zcu )) return Value .fromInterned (try pt .intern (.{ .undef = ty .toIntern () }));
@@ -1671,7 +1671,7 @@ pub fn bitwiseNotScalar(val: Value, ty: Type, arena: Allocator, pt: Zcu.PerThrea
1671
1671
return pt .intValue_big (ty , result_bigint .toConst ());
1672
1672
}
1673
1673
1674
- /// operands must be (vectors of) integers; handles undefined scalars.
1674
+ /// operands must be (vectors of) integers or bools ; handles undefined scalars.
1675
1675
pub fn bitwiseAnd (lhs : Value , rhs : Value , ty : Type , allocator : Allocator , pt : Zcu.PerThread ) ! Value {
1676
1676
const zcu = pt .zcu ;
1677
1677
if (ty .zigTypeTag (zcu ) == .vector ) {
@@ -1690,7 +1690,7 @@ pub fn bitwiseAnd(lhs: Value, rhs: Value, ty: Type, allocator: Allocator, pt: Zc
1690
1690
return bitwiseAndScalar (lhs , rhs , ty , allocator , pt );
1691
1691
}
1692
1692
1693
- /// operands must be integers; handles undefined.
1693
+ /// operands must be integers or bools ; handles undefined.
1694
1694
pub fn bitwiseAndScalar (orig_lhs : Value , orig_rhs : Value , ty : Type , arena : Allocator , pt : Zcu.PerThread ) ! Value {
1695
1695
const zcu = pt .zcu ;
1696
1696
// If one operand is defined, we turn the other into `0xAA` so the bitwise AND can
@@ -1744,7 +1744,7 @@ fn intValueAa(ty: Type, arena: Allocator, pt: Zcu.PerThread) !Value {
1744
1744
return pt .intValue_big (ty , result_bigint .toConst ());
1745
1745
}
1746
1746
1747
- /// operands must be (vectors of) integers; handles undefined scalars.
1747
+ /// operands must be (vectors of) integers or bools ; handles undefined scalars.
1748
1748
pub fn bitwiseNand (lhs : Value , rhs : Value , ty : Type , arena : Allocator , pt : Zcu.PerThread ) ! Value {
1749
1749
const zcu = pt .zcu ;
1750
1750
if (ty .zigTypeTag (zcu ) == .vector ) {
@@ -1763,7 +1763,7 @@ pub fn bitwiseNand(lhs: Value, rhs: Value, ty: Type, arena: Allocator, pt: Zcu.P
1763
1763
return bitwiseNandScalar (lhs , rhs , ty , arena , pt );
1764
1764
}
1765
1765
1766
- /// operands must be integers; handles undefined.
1766
+ /// operands must be integers or bools ; handles undefined.
1767
1767
pub fn bitwiseNandScalar (lhs : Value , rhs : Value , ty : Type , arena : Allocator , pt : Zcu.PerThread ) ! Value {
1768
1768
const zcu = pt .zcu ;
1769
1769
if (lhs .isUndef (zcu ) or rhs .isUndef (zcu )) return Value .fromInterned (try pt .intern (.{ .undef = ty .toIntern () }));
@@ -1774,7 +1774,7 @@ pub fn bitwiseNandScalar(lhs: Value, rhs: Value, ty: Type, arena: Allocator, pt:
1774
1774
return bitwiseXor (anded , all_ones , ty , arena , pt );
1775
1775
}
1776
1776
1777
- /// operands must be (vectors of) integers; handles undefined scalars.
1777
+ /// operands must be (vectors of) integers or bools ; handles undefined scalars.
1778
1778
pub fn bitwiseOr (lhs : Value , rhs : Value , ty : Type , allocator : Allocator , pt : Zcu.PerThread ) ! Value {
1779
1779
const zcu = pt .zcu ;
1780
1780
if (ty .zigTypeTag (zcu ) == .vector ) {
@@ -1793,7 +1793,7 @@ pub fn bitwiseOr(lhs: Value, rhs: Value, ty: Type, allocator: Allocator, pt: Zcu
1793
1793
return bitwiseOrScalar (lhs , rhs , ty , allocator , pt );
1794
1794
}
1795
1795
1796
- /// operands must be integers; handles undefined.
1796
+ /// operands must be integers or bools ; handles undefined.
1797
1797
pub fn bitwiseOrScalar (orig_lhs : Value , orig_rhs : Value , ty : Type , arena : Allocator , pt : Zcu.PerThread ) ! Value {
1798
1798
// If one operand is defined, we turn the other into `0xAA` so the bitwise AND can
1799
1799
// still zero out some bits.
@@ -1827,7 +1827,7 @@ pub fn bitwiseOrScalar(orig_lhs: Value, orig_rhs: Value, ty: Type, arena: Alloca
1827
1827
return pt .intValue_big (ty , result_bigint .toConst ());
1828
1828
}
1829
1829
1830
- /// operands must be (vectors of) integers; handles undefined scalars.
1830
+ /// operands must be (vectors of) integers or bools ; handles undefined scalars.
1831
1831
pub fn bitwiseXor (lhs : Value , rhs : Value , ty : Type , allocator : Allocator , pt : Zcu.PerThread ) ! Value {
1832
1832
const zcu = pt .zcu ;
1833
1833
if (ty .zigTypeTag (zcu ) == .vector ) {
@@ -1846,7 +1846,7 @@ pub fn bitwiseXor(lhs: Value, rhs: Value, ty: Type, allocator: Allocator, pt: Zc
1846
1846
return bitwiseXorScalar (lhs , rhs , ty , allocator , pt );
1847
1847
}
1848
1848
1849
- /// operands must be integers; handles undefined.
1849
+ /// operands must be integers or bools ; handles undefined.
1850
1850
pub fn bitwiseXorScalar (lhs : Value , rhs : Value , ty : Type , arena : Allocator , pt : Zcu.PerThread ) ! Value {
1851
1851
const zcu = pt .zcu ;
1852
1852
if (lhs .isUndef (zcu ) or rhs .isUndef (zcu )) return Value .fromInterned (try pt .intern (.{ .undef = ty .toIntern () }));
0 commit comments