https://bugs.llvm.org/show_bug.cgi?id=43428

Nikita Popov <nikita....@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nikita....@gmail.com
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #1 from Nikita Popov <nikita....@gmail.com> ---
Codegen on trunk:

sample(unsigned int): # @sample(unsigned int)
  xor ecx, ecx
  cmp edi, 9
  mov eax, 42
  cmovbe eax, ecx
  ret

Can't really comment on the precise instruction choice, but the optimization to
"m >= 10 ? 42 : 0" is happening now, which I assume was the main concern here.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to