llvm.org GIT mirror llvm / beacf66
Fix name of an intrinsic: bit.part_select -> part.select git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35853 91177308-0d34-0410-b5e6-96231b3b80d8 Reid Spencer 12 years ago
1 changed file(s) with 18 addition(s) and 18 deletion(s). Raw diff Collapse all Expand all
183183
  • 'llvm.ctpop.*' Intrinsic
  • 184184
  • 'llvm.ctlz.*' Intrinsic
  • 185185
  • 'llvm.cttz.*' Intrinsic
  • 186
  • 'llvm.bit.part_select.*' Intrinsic
  • 186
  • 'llvm.part_select.*' Intrinsic
  • 187187
    188188
    189189
  • Debugger intrinsics
  • 45894589
    45904590
    45914591
    4592 'llvm.bit.part_select.*' Intrinsic
    4593
    4594
    4595
    4596
    4597
    Syntax:
    4598

    This is an overloaded intrinsic. You can use llvm.bit.part_select

    4592 'llvm.part.select.*' Intrinsic
    4593
    4594
    4595
    4596
    4597
    Syntax:
    4598

    This is an overloaded intrinsic. You can use llvm.part.select

    45994599 on any integer bit width.
    46004600
    
                      
                    
    4601 declare i17 @llvm.bit.part_select.i17.i17 (i17 %val, i32 %loBit, i32 %hiBit)
    4602 declare i29 @llvm.bit.part_select.i29.i29 (i29 %val, i32 %loBit, i32 %hiBit)
    4603
    4604
    4605
    Overview:
    4606

    The 'llvm.bit.part_select' family of intrinsic functions selects a

    4601 declare i17 @llvm.part.select.i17.i17 (i17 %val, i32 %loBit, i32 %hiBit)
    4602 declare i29 @llvm.part.select.i29.i29 (i29 %val, i32 %loBit, i32 %hiBit)
    4603
    4604
    4605
    Overview:
    4606

    The 'llvm.part.select' family of intrinsic functions selects a

    46074607 range of bits from an integer value and returns them in the same bit width as
    46084608 the original value.

    46094609
    46134613 arguments must be i32 type since they specify only a bit index.

    46144614
    46154615
    Semantics:
    4616

    The operation of the 'llvm.bit.part_select' intrinsic has two modes

    4616

    The operation of the 'llvm.part.select' intrinsic has two modes

    46174617 of operation: forwards and reverse. If %loBit is greater than
    46184618 %hiBits then the intrinsic operates in reverse mode. Otherwise it
    46194619 operates in forward mode.

    46314631

    In reverse mode, a similar computation is made except that:

    46324632
    46334633
  • The bits selected wrap around to include both the highest and lowest bits.
  • 4634 For example, part_select(i16 X, 4, 7) selects bits from X with a mask of
    4635 0x00F0 (forwards case) while part_select(i16 X, 8, 3) selects bits from X
    4634 For example, part.select(i16 X, 4, 7) selects bits from X with a mask of
    4635 0x00F0 (forwards case) while part.select(i16 X, 8, 3) selects bits from X
    46364636 with a mask of 0xFF0F.
    46374637
  • The bits returned in the reverse case are reversed. So, if X has the value
  • 4638 0x6ACF and we apply part_select(i16 X, 8, 3) to it, we get back the value
    4638 0x6ACF and we apply part.select(i16 X, 8, 3) to it, we get back the value
    46394639 0x0A6F.
    46404640
    46414641