There must be something we do not understand in codegen, as enabling an optimization causes it to fail