Skip to content

Commit 698f10a

Browse files
committed
Fix typo swapping logical operations on bools
1 parent a6ccd77 commit 698f10a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

crates/rustc_codegen_spirv/src/builder/builder_methods.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -2144,7 +2144,8 @@ impl<'a, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'tcx> {
21442144
self.emit().logical_or(b, None, lhs.def(self), rhs)
21452145
}
21462146
// x < y => !x && y
2147-
IntULE => {
2147+
IntULT => {
2148+
// intel-compute-runtime doesn't like OpLogicalNot
21482149
let true_ = self.constant_bool(self.span(), true);
21492150
let lhs = self
21502151
.emit()
@@ -2153,7 +2154,8 @@ impl<'a, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'tcx> {
21532154
self.emit().logical_and(b, None, lhs, rhs.def(self))
21542155
}
21552156
// x <= y => !x || y
2156-
IntULT => {
2157+
IntULE => {
2158+
// intel-compute-runtime doesn't like OpLogicalNot
21572159
let true_ = self.constant_bool(self.span(), true);
21582160
let lhs = self
21592161
.emit()

0 commit comments

Comments
 (0)