[all-commits] [llvm/llvm-project] b08334: [llvm][NVPTX] Don't reorder MIs that construct a P...

Youngsuk Kim via All-commits all-commits at lists.llvm.org
Mon Nov 18 14:12:40 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b083340cb663b6bd785dbd5864e5afd950745e35
      https://github.com/llvm/llvm-project/commit/b083340cb663b6bd785dbd5864e5afd950745e35
  Author: Youngsuk Kim <youngsuk.kim at hpe.com>
  Date:   2024-11-18 (Mon, 18 Nov 2024)

  Changed paths:
    M llvm/lib/Target/NVPTX/NVPTXInstrInfo.cpp
    M llvm/lib/Target/NVPTX/NVPTXInstrInfo.h
    A llvm/test/CodeGen/NVPTX/misched_func_call.ll

  Log Message:
  -----------
  [llvm][NVPTX] Don't reorder MIs that construct a PTX function call (#116522)

With "-enable-misched", MachineScheduler can reorder MIs that must stick
together (in initially set order) to generate legal PTX code for a
function call.

When generating PTX code for the attached test (using LLVM before this
revision), the following invalid PTX code is generated:

```
  { // callseq 0, 0
  .param .b64 param0;
  st.param.f64  [param0], 0d0000000000000000;
  .param .b64 retval0;
  call.uni (retval0),
  mul.lo.s32  %r7, %r10, %r3;
  or.b32    %r8, %r4, %r7;
  mul.lo.s32  %r9, %r2, %r8;
  cvt.rn.f64.s32  %fd3, %r9;
  quux,
  (
  param0
  );
  ld.param.f64  %fd1, [retval0];
  } // callseq 0
```



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list