[llvm-dev] shl

Fabian Giesen via llvm-dev llvm-dev at lists.llvm.org
Wed May 15 13:10:30 PDT 2019


On 5/15/2019 1:03 PM, Josh Sharp via llvm-dev wrote:
> Hi,
> I got a question about the SDNode "shl"
> 
> def shl        : SDNode<"ISD::SHL"       , SDTIntShiftOp>;
> 
> Does it stand for "shift logical" and in what direction does it shift?
> How to shift in the other direction?

SHift Left.

The corresponding right shifts are SRA (Shift Right Arithmetic) and SRL 
(Shift Right Logical). The former shifts in copies of the sign bit at 
the top, the latter shifts in zeroes.

-Fabian


More information about the llvm-dev mailing list