don't turn sext into uext

This commit is contained in:
Daniel Wagner 2018-06-08 11:45:59 -04:00
parent b5c143418d
commit a9d49a96ed

View File

@ -173,7 +173,7 @@ rewriteApp app = do
Trunc (valueAsApp -> Just (SExt v _)) w -> case compareNat w (typeWidth v) of
NatLT _ -> rewriteApp $ Trunc v w
NatEQ -> pure v
NatGT _ -> rewriteApp $ UExt v w
NatGT _ -> rewriteApp $ SExt v w
SExt (BVValue u x) w -> do
pure $ BVValue w $ toUnsigned w $ toSigned u x