julia> -2 <= 1 <= 2
true
julia> @code_typed (-2 <= 1 <= 2)
ERROR: expression is not a function call, or is too complex for @code_typed to analyze; break it down to simpler parts if possible. In some cases, you may want to use Meta.@lower.
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:33
[2] top-level scope
@ /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/InteractiveUtils/src/macros.jl:222
Same thing happens with @code_llvm. OTOH @code_typed (-2 <= 1) works fine. Why can’t I see what these compile down to?
Well, if it’s a single function call, then it’s simple enough. And -2 <= 1 is a single call to the function <= with two input arguments, so it’s <=(-2, 1).
So, if in doubt, just create a function that calls your code.