This is an archive of the discontinued LLVM Phabricator instance.

[X86] Teach the isel optimization for (x << C1) op C2 to (x op (C2>>C1)) << C1 to consider cases where C2>>C1 can fit an unsigned 32-bit immediate
ClosedPublic

Authored by craig.topper on Mar 26 2019, 11:23 PM.

Details

Summary

For 64-bit operations we should consider if the immediate can be made to fit
in an unsigned 32-bits immedate. For OR/XOR this allows us to load the immediate
with MOV32ri instead of movabsq. For AND this allows us to fold the immediate.

Diff Detail

Repository
rL LLVM