diff --git a/IPython/core/magics/execution.py b/IPython/core/magics/execution.py
index 195d75c..ccc1a2b 100644
--- a/IPython/core/magics/execution.py
+++ b/IPython/core/magics/execution.py
@@ -959,9 +959,9 @@ python-profiler package from non-free.""")
             raise UsageError("Can't use statement directly after '%%time'!")
         
         if cell:
-            expr = self.shell.prefilter(cell,False)
+            expr = self.shell.input_transformer_manager.transform_cell(cell)
         else:
-            expr = self.shell.prefilter(line,False)
+            expr = self.shell.input_transformer_manager.transform_cell(line)
 
         # Minimum time above which parse time will be reported
         tp_min = 0.1