File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 11/* ******************************************************************************
2- * Copyright 2022 Intel Corporation
2+ * Copyright 2022-2023 Intel Corporation
33*
44* Licensed under the Apache License, Version 2.0 (the "License");
55* you may not use this file except in compliance with the License.
@@ -1072,9 +1072,15 @@ class expr_evaluator_t : public ir_visitor_t {
10721072 case op_kind_t ::_ne: {
10731073 ir_assert (!dst.is_negated ()) << " Destination can't be negated." ;
10741074 ngen::InstructionModifier cmp_mod = mod;
1075- cmp_mod |= cmp_op_to_ngen (obj.op_kind );
1076- cmp_mod |= dst.flag_register ();
1077- host_->ecmp (cmp_mod, src0, src1);
1075+ if (!src0.is_reg_data ()) {
1076+ cmp_mod |= cmp_op_to_ngen (negate_cmp_op (obj.op_kind ));
1077+ cmp_mod |= dst.flag_register ();
1078+ host_->ecmp (cmp_mod, src1, src0);
1079+ } else {
1080+ cmp_mod |= cmp_op_to_ngen (obj.op_kind );
1081+ cmp_mod |= dst.flag_register ();
1082+ host_->ecmp (cmp_mod, src0, src1);
1083+ }
10781084 break ;
10791085 }
10801086 case op_kind_t ::_and: host_->eand (mod, dst, src0, src1); break ;
You can’t perform that action at this time.
0 commit comments