Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

Combine and-mask+icmp eq -> icmp ule when mask was all-ones in high bits #37764

Open Quuxplusone opened 6 years ago

Quuxplusone commented 6 years ago
Bugzilla Link PR38791
Status NEW
Importance P enhancement
Reported by Roman Lebedev (lebedev.ri@gmail.com)
Reported on 2018-08-31 06:26:26 -0700
Last modified on 2018-09-07 00:50:19 -0700
Version trunk
Hardware PC Linux
CC david.bolvansky@gmail.com, llvm-bugs@lists.llvm.org
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also PR38123
Copied from https://bugs.llvm.org/show_bug.cgi?id=38123

Name: range using high bits
%masked = or i8 %arg, 192
%r = icmp ne i8 %masked, %arg
  =>
%r = icmp ult i8 %arg, 192

https://rise4fun.com/Alive/lv5
Quuxplusone commented 6 years ago
Also
%masked = or i8 %arg, 192
%r = icmp eq i8 %masked, %arg
  =>
%r = icmp uge i8 %arg, 192