Closed
Description
enum fast { x, y, z, w }
enum slow<T> { a(T), b(T), c(T), d(T) }
fn foo(yy: fast, xx: fast) -> bool {
ret yy == xx;
}
fn bar(yy: slow<bool>, xx: slow<bool>) -> bool {
ret yy == xx;
}
Both foo
and bar
generate calls to upcall_cmp_type
. It'd be nice if, for performance, the compiler could recognise that fast
can be represented by a primitive and skip the upcalls.
Related to #2132.