Skip to content
  1. Mar 23, 2017
  2. Mar 22, 2017
  3. Mar 10, 2017
  4. Mar 07, 2017
  5. Feb 27, 2017
    • Matt Arsenault's avatar
      AMDGPU: Add VOP3P instruction format · 9be7b0d4
      Matt Arsenault authored
      Add a few non-VOP3P but instructions related to packed.
      
      Includes hack with dummy operands for the benefit of the assembler
      
      llvm-svn: 296368
      9be7b0d4
    • Konstantin Zhuravlyov's avatar
      [AMDGPU] Runtime metadata fixes: · 972948b3
      Konstantin Zhuravlyov authored
        - Verify that runtime metadata is actually valid runtime metadata when assembling, otherwise we could accept the following when assembling, but ocl runtime will reject it:
          .amdgpu_runtime_metadata
          { amd.MDVersion: [ 2, 1 ], amd.RandomUnknownKey, amd.IsaInfo: ...
        - Make IsaInfo optional, and always emit it.
      
      Differential Revision: https://reviews.llvm.org/D30349
      
      llvm-svn: 296324
      972948b3
  6. Feb 10, 2017
  7. Feb 08, 2017
  8. Feb 04, 2017
  9. Feb 03, 2017
  10. Feb 02, 2017
    • Matt Arsenault's avatar
      AMDGPU: Use source modifiers with f16->f32 conversions · 9dba9bd4
      Matt Arsenault authored
      The operand types were defined to fit the fp16_to_fp node, which
      has the half as an integer type. v_cvt_f32_f16 does support
      source modifiers, so change this to have an FP type and modifiers.
      
      For targets without legal f16, this requires recognizing the
      bit operations and trying to produce them.
      
      llvm-svn: 293857
      9dba9bd4
  11. Jan 20, 2017
  12. Jan 13, 2017
  13. Dec 23, 2016
  14. Dec 19, 2016
  15. Dec 14, 2016
  16. Dec 12, 2016
  17. Dec 10, 2016
    • Matt Arsenault's avatar
      AMDGPU: Fix handling of 16-bit immediates · 4bd72361
      Matt Arsenault authored
      Since 32-bit instructions with 32-bit input immediate behavior
      are used to materialize 16-bit constants in 32-bit registers
      for 16-bit instructions, determining the legality based
      on the size is incorrect. Change operands to have the size
      specified in the type.
      
      Also adds a workaround for a disassembler bug that
      produces an immediate MCOperand for an operand that
      is supposed to be OPERAND_REGISTER.
      
      The assembler appears to accept out of bounds immediates and
      truncates them, but this seems to be an issue for 32-bit
      already.
      
      llvm-svn: 289306
      4bd72361
  18. Nov 19, 2016
    • Daniel Sanders's avatar
      Check that emitted instructions meet their predicates on all targets except ARM, Mips, and X86. · 72db2a39
      Daniel Sanders authored
      Summary:
      * ARM is omitted from this patch because this check appears to expose bugs in this target.
      * Mips is omitted from this patch because this check either detects bugs or deliberate
        emission of instructions that don't satisfy their predicates. One deliberate
        use is the SYNC instruction where the version with an operand is correctly
        defined as requiring MIPS32 while the version without an operand is defined
        as an alias of 'SYNC 0' and requires MIPS2.
      * X86 is omitted from this patch because it doesn't use the tablegen-erated
        MCCodeEmitter infrastructure.
      
      Patches for ARM and Mips will follow.
      
      Depends on D25617
      
      Reviewers: tstellarAMD, jmolloy
      
      Subscribers: wdng, jmolloy, aemerson, rengolin, arsenm, jyknight, nemanjai, nhaehnle, tstellarAMD, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D25618
      
      llvm-svn: 287439
      72db2a39
  19. Nov 11, 2016
  20. Nov 10, 2016
  21. Oct 29, 2016
  22. Oct 20, 2016
  23. Oct 19, 2016
  24. Oct 18, 2016
  25. Oct 14, 2016
  26. Oct 10, 2016
  27. Oct 07, 2016
  28. Oct 06, 2016
  29. Sep 21, 2016
  30. Sep 19, 2016
    • Sam Kolton's avatar
      [AMDGPU] Fix s_branch with -1 offset · be7ffb90
      Sam Kolton authored
      Summary:
      In case s_branch instruction target is itself backend should emit offset -1 but instead it emit 0.
      '''
      label:
          s_branch label  // should emit [0xff,0xff,0x82,0xbf]
      '''
      
      Tom, Matt: why are we adjusting fixup values in applyFixup() method instead of processFixup()? processFixup() is calling adjustFixupValue() but does nothing with its result.
      
      Reviewers: vpykhtin, artem.tamazov, tstellarAMD
      
      Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl
      
      Differential Revision: https://reviews.llvm.org/D24671
      
      llvm-svn: 281896
      be7ffb90
  31. Sep 09, 2016
    • Sam Kolton's avatar
      AMDGPU] Assembler: better support for immediate literals in assembler. · 1eeb11bf
      Sam Kolton authored
      Summary:
      Prevously assembler parsed all literals as either 32-bit integers or 32-bit floating-point values. Because of this we couldn't support f64 literals.
      E.g. in instruction "v_fract_f64 v[0:1], 0.5", literal 0.5 was encoded as 32-bit literal 0x3f000000, which is incorrect and will be interpreted as 3.0517578125E-5 instead of 0.5. Correct encoding is inline constant 240 (optimal) or 32-bit literal 0x3FE00000 at least.
      
      With this change the way immediate literals are parsed is changed. All literals are always parsed as 64-bit values either integer or floating-point. Then we convert parsed literals to correct form based on information about type of operand parsed (was literal floating or binary) and type of expected instruction operands (is this f32/64 or b32/64 instruction).
      Here are rules how we convert literals:
          - We parsed fp literal:
              - Instruction expects 64-bit operand:
                  - If parsed literal is inlinable (e.g. v_fract_f64_e32 v[0:1], 0.5)
                      - then we do nothing this literal
                  - Else if literal is not-inlinable but instruction requires to inline it (e.g. this is e64 encoding, v_fract_f64_e64 v[0:1], 1.5)
                      - report error
                  - Else literal is not-inlinable but we can encode it as additional 32-bit literal constant
                      - If instruction expect fp operand type (f64)
                          - Check if low 32 bits of literal are zeroes (e.g. v_fract_f64 v[0:1], 1.5)
                              - If so then do nothing
                          - Else (e.g. v_fract_f64 v[0:1], 3.1415)
                              - report warning that low 32 bits will be set to zeroes and precision will be lost
                              - set low 32 bits of literal to zeroes
                      - Instruction expects integer operand type (e.g. s_mov_b64_e32 s[0:1], 1.5)
                          - report error as it is unclear how to encode this literal
              - Instruction expects 32-bit operand:
                  - Convert parsed 64 bit fp literal to 32 bit fp. Allow lose of precision but not overflow or underflow
                  - Is this literal inlinable and are we required to inline literal (e.g. v_trunc_f32_e64 v0, 0.5)
                      - do nothing
                      - Else report error
                  - Do nothing. We can encode any other 32-bit fp literal (e.g. v_trunc_f32 v0, 10000000.0)
          - Parsed binary literal:
              - Is this literal inlinable (e.g. v_trunc_f32_e32 v0, 35)
                  - do nothing
              - Else, are we required to inline this literal (e.g. v_trunc_f32_e64 v0, 35)
                  - report error
              - Else, literal is not-inlinable and we are not required to inline it
                  - Are high 32 bit of literal zeroes or same as sign bit (32 bit)
                      - do nothing (e.g. v_trunc_f32 v0, 0xdeadbeef)
                  - Else
                      - report error (e.g. v_trunc_f32 v0, 0x123456789abcdef0)
      
      For this change it is required that we know operand types of instruction (are they f32/64 or b32/64). I added several new register operands (they extend previous register operands) and set operand types to corresponding types:
      '''
      enum OperandType {
          OPERAND_REG_IMM32_INT,
          OPERAND_REG_IMM32_FP,
          OPERAND_REG_INLINE_C_INT,
          OPERAND_REG_INLINE_C_FP,
      }
      '''
      
      This is not working yet:
          - Several tests are failing
          - Problems with predicate methods for inline immediates
          - LLVM generated assembler parts try to select e64 encoding before e32.
      More changes are required for several AsmOperands.
      
      Reviewers: vpykhtin, tstellarAMD
      
      Subscribers: arsenm, kzhuravl, artem.tamazov
      
      Differential Revision: https://reviews.llvm.org/D22922
      
      llvm-svn: 281050
      1eeb11bf
    • Sam Kolton's avatar
      [AMDGPU] Assembler: rename amd_kernel_code_t asm names according to spec · a2e5c88b
      Sam Kolton authored
      Summary:
      Also removed duplicate code from AMDGPUTargetAsmStreamer.
      This change only change how amd_kernel_code_t is parsed and printed. No variable names are changed.
      
      Reviewers: vpykhtin, tstellarAMD
      
      Subscribers: arsenm, wdng, nhaehnle
      
      Differential Revision: https://reviews.llvm.org/D24296
      
      llvm-svn: 281028
      a2e5c88b
  32. Aug 29, 2016
Loading