Expand functionality to catch odd truncates (#585)
Fixes #583
* Changes UndoTruncatedSwitchPass to look for truncates to look for
truncates to non-power-of-2 integer sizes instead of switches on odd
sizes
* rename pass
* new logic to update instructions that aren't full rewritten
* handle mixed input sizes for binary ops
* handle truncate and zero extend better
* new tests
diff --git a/lib/Compiler.cpp b/lib/Compiler.cpp
index 10a14dd..2b95681 100644
--- a/lib/Compiler.cpp
+++ b/lib/Compiler.cpp
@@ -684,7 +684,7 @@
pm->add(clspv::createFunctionInternalizerPass());
pm->add(clspv::createReplaceLLVMIntrinsicsPass());
pm->add(clspv::createUndoBoolPass());
- pm->add(clspv::createUndoTruncatedSwitchConditionPass());
+ pm->add(clspv::createUndoTruncateToOddIntegerPass());
pm->add(llvm::createStructurizeCFGPass(false));
// Must be run after structurize cfg.
pm->add(clspv::createFixupStructuredCFGPass());