[all-commits] [llvm/llvm-project] ccc312: [NVPTX] support switch statement with brx.idx (rel...

Alex MacLean via All-commits all-commits at lists.llvm.org
Fri Aug 9 11:46:59 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ccc31278bd01d6728c48f1b1f11c56e7a092bb47
      https://github.com/llvm/llvm-project/commit/ccc31278bd01d6728c48f1b1f11c56e7a092bb47
  Author: Alex MacLean <amaclean at nvidia.com>
  Date:   2024-08-09 (Fri, 09 Aug 2024)

  Changed paths:
    M llvm/include/llvm/CodeGen/TargetLowering.h
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
    M llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp
    M llvm/lib/Target/NVPTX/NVPTXISelLowering.h
    M llvm/lib/Target/NVPTX/NVPTXInstrInfo.td
    A llvm/test/CodeGen/NVPTX/jump-table.ll

  Log Message:
  -----------
  [NVPTX] support switch statement with brx.idx (reland) (#102550)

Add custom lowering for `BR_JT` DAG nodes to the `brx.idx` PTX
instruction ([PTX ISA 9.7.13.4. Control Flow Instructions: brx.idx]
(https://docs.nvidia.com/cuda/parallel-thread-execution/#control-flow-instructions-brx-idx)).
Depending on the heuristics in DAG selection, `switch` statements may
now be lowered using `brx.idx`.

Note: this fixes the previous issue in #102400 by adding the isBarrier
attribute to BRX_END



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