X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=OPTIMIZATIONS;h=0c8e790a86ae463ece5795b9fcaac1d1312cf8b3;hb=de01f09401517c1a96de3faeac585e46895940ec;hp=c79f922af56f7b7a374b69f8cb15c589f7ed8c11;hpb=d319b944d934f3efbb01a2a345c46bafd40857d0;p=sbcl.git diff --git a/OPTIMIZATIONS b/OPTIMIZATIONS index c79f922..0c8e790 100644 --- a/OPTIMIZATIONS +++ b/OPTIMIZATIONS @@ -265,3 +265,18 @@ architectures. Certainly adding #!+/- magic in compiler/*.lisp could be done, but such a solution is somewhat inelegant. Moving the relevant DEFTRANSFORMs to the architecture-specific compiler/* areas is also possible, but that would duplicate quite a bit of code. +-------------------------------------------------------------------------------- +#30 +(defun foo (x y) + (< x y)) + +FOO's IR1 representation is roughly: + +(defun foo (x y) + (if (< x y) + T + NIL)) + +However, if a full call is generated for < (and similarly for other +predicate functions), then the IF is unnecessary, since the return value +of (< x y) is already T or NIL.