diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
index 6c76c42a5893a9878d49e80807b36e51b4021887_bWVyY3VyaWFsL2NtZHV0aWwucHk=..8e0e334bad42066efb76b21b62d48a8f15bad8f4_bWVyY3VyaWFsL2NtZHV0aWwucHk= 100644
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -1951,7 +1951,8 @@
     # platforms without shell expansion (windows).
     wctx = repo[None]
     match, pats = scmutil.matchandpats(wctx, pats, opts)
-    slowpath = match.anypats() or (match.files() and opts.get('removed'))
+    slowpath = match.anypats() or ((match.isexact() or match.prefix()) and
+                                   opts.get('removed'))
     if not slowpath:
         for f in match.files():
             if follow and f not in wctx: