Index: /trunk/source/compiler/nx0.lisp
===================================================================
--- /trunk/source/compiler/nx0.lisp	(revision 13889)
+++ /trunk/source/compiler/nx0.lisp	(revision 13890)
@@ -581,5 +581,5 @@
                     (if (acode-p x)
                       (if (and (eq (acode-operator x) (%nx1-operator immediate))
-                               (typep (cadr x) 'fixnum))
+                               (typep (cadr x) 'integer))
                         (cadr x)))))))
     (and int
@@ -595,5 +595,5 @@
                     (if (acode-p x)
                       (if (and (eq (acode-operator x) (%nx1-operator immediate))
-                               (typep (cadr x) 'fixnum))
+                               (typep (cadr x) 'integer))
                         (cadr x)))))))
     (and int
@@ -2778,5 +2778,17 @@
 	 (fix-2 (nx-acode-fixnum-type-p form-2 env))
 	 (nat-1 (nx-acode-natural-type-p form-1 env))
-	 (nat-2 (nx-acode-natural-type-p form-2 env)))
+	 (nat-2 (nx-acode-natural-type-p form-2 env))
+	 (natural-width (target-word-size-case (32 32) (64 64)))
+	 (natural-mask (1- (ash 1 natural-width))))
+    (when (and nat-1
+	       (not nat-2)
+	       (acode-integer-constant-p form-2 natural-width))
+	(setq form-2 (nx1-form (logand natural-mask arg-2))
+	      nat-2 t))
+    (when (and (not nat-1)
+	       nat-2
+	       (acode-integer-constant-p form-1 natural-width))
+	(setq form-1 (nx1-form (logand natural-mask arg-1))
+	      nat-1 t))
     (cond
       ((and fix-1 fix-2)
