summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backend/src/backend/gen_insn_selection.cpp6
-rw-r--r--backend/src/sys/cvar.hpp2
-rw-r--r--utests/compiler_shader_toy.cpp2
3 files changed, 5 insertions, 5 deletions
diff --git a/backend/src/backend/gen_insn_selection.cpp b/backend/src/backend/gen_insn_selection.cpp
index f0ac4d63..673bdc69 100644
--- a/backend/src/backend/gen_insn_selection.cpp
+++ b/backend/src/backend/gen_insn_selection.cpp
@@ -1097,9 +1097,6 @@ namespace gbe
}
};
- /*! Force MAD pattern */
- BVAR(OCL_FORCE_MAD_PATTERN, false);
-
/*! MAD pattern */
class MulAddInstructionPattern : public SelectionPattern
{
@@ -1816,6 +1813,9 @@ namespace gbe
}
SelectionLibrary::SelectionLibrary(void) {
+ /*! Force MAD pattern */
+ BVAR(OCL_FORCE_MAD_PATTERN, false);
+
this->insert<UnaryInstructionPattern>();
this->insert<BinaryInstructionPattern>();
this->insert<TernaryInstructionPattern>();
diff --git a/backend/src/sys/cvar.hpp b/backend/src/sys/cvar.hpp
index b2181932..7350a3ef 100644
--- a/backend/src/sys/cvar.hpp
+++ b/backend/src/sys/cvar.hpp
@@ -74,7 +74,7 @@ namespace gbe
static gbe::CVarInit __CVAR##NAME##__LINE__##__(#NAME, &NAME, STR);
/*! Declare a Boolean variable (just an integer in {0,1}) */
-#define BVAR(NAME, CURR) IVAR(NAME, 0, CURR, 1)
+#define BVAR(NAME, CURR) IVAR(NAME, 0, CURR ? 1 : 0, 1)
#endif /* __GBE_CVAR_HPP__ */
diff --git a/utests/compiler_shader_toy.cpp b/utests/compiler_shader_toy.cpp
index 16e9f768..49f82543 100644
--- a/utests/compiler_shader_toy.cpp
+++ b/utests/compiler_shader_toy.cpp
@@ -22,7 +22,7 @@
* http://www.iquilezles.org/apps/shadertoy/index.html
*
* They are pretty cool and rather complex kernels. Just the right thing to have
- * something a bit more complicated and interesting than unit test.
+ * something a bit more complicated and interesting than unit tests.
*
* The code here is just to wrap the common code used by all the kernels (to run
* the code and assert its correctness)