The result of ISD::USUBSAT will never be larger than the LHS. We
can use this to put a bound on the number of leading zeros.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/test/CodeGen/X86/usub_sat_plus.ll | ||
---|---|---|
135 | This is still less than optimal. The movzbl at line 133 is really an any_extend. The other operand of the cmovbl is 0. Had we used a zero_extend at 133 this movzbl wouldn't be needed. |
Comment Actions
LGTM
llvm/test/CodeGen/X86/usub_sat_plus.ll | ||
---|---|---|
135 | Its sort of related to PR40881 - which complains about a similar thing resulting in ZEXTLOAD vs EXTLOAD. |
This is still less than optimal. The movzbl at line 133 is really an any_extend. The other operand of the cmovbl is 0. Had we used a zero_extend at 133 this movzbl wouldn't be needed.