[all-commits] [llvm/llvm-project] b74e58: [NVPTX] Don't use stack memory when bitcasting to/...

peterbell10 via All-commits all-commits at lists.llvm.org
Fri Nov 1 08:03:05 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b74e588e1f460eb48ceb1a30cf8ac870b7537dcc
      https://github.com/llvm/llvm-project/commit/b74e588e1f460eb48ceb1a30cf8ac870b7537dcc
  Author: peterbell10 <peterbell10 at openai.com>
  Date:   2024-11-01 (Fri, 01 Nov 2024)

  Changed paths:
    M llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp
    M llvm/lib/Target/NVPTX/NVPTXISelLowering.h
    A llvm/test/CodeGen/NVPTX/i8x2-instructions.ll

  Log Message:
  -----------
  [NVPTX] Don't use stack memory when bitcasting to/from v2i8 (#113928)

`v2i8` is an unsupported type, so we hit the default legalization rules
which perform the bitcast in stack memory and is very inefficient on
GPU.

This adds a custom lowering where we pack `v2i8` into `i16` and from
there use another bitcast node to reach the final desired type. And also
the inverse unpacking `i16` into `v2i8`.



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