From 7f56d92bac91e3e52176e41536c8ae25c29076d2 Mon Sep 17 00:00:00 2001
From: clc5q <clc5q@git.zephyr-software.com>
Date: Tue, 18 Mar 2014 04:37:37 +0000
Subject: [PATCH] Solve bug 142 by propagating NUMERIC type in MEDS for sign-
 and zero-extended loads, triggering more IDIOM 18 annotations.

---
 SMPInstr.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/SMPInstr.cpp b/SMPInstr.cpp
index 262581a5..76474b8e 100644
--- a/SMPInstr.cpp
+++ b/SMPInstr.cpp
@@ -6008,6 +6008,10 @@ bool SMPInstr::InferOperatorType(SMPRegTransfer *CurrRT) {
 		case SMP_SIGN_EXTEND:
 		case SMP_ZERO_EXTEND:
 			// Should we infer that all operands are NUMERIC?  !!!???!!!!
+			if (UNINIT == CurrRT->GetOperatorType()) {
+				CurrRT->SetOperatorType(NUMERIC, this);
+				updated = true;
+			}
 			break;
 
 		case SMP_ADDRESS_OF: // take effective address
-- 
GitLab