[all-commits] [llvm/llvm-project] 8d6047: [SPIR-V] Fix correction shift for i8 bitreverse in...

Arseniy Obolenskiy via All-commits all-commits at lists.llvm.org
Thu Jun 25 22:39:06 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8d60471f89fc7b57c08d64d7524dfbff48078567
      https://github.com/llvm/llvm-project/commit/8d60471f89fc7b57c08d64d7524dfbff48078567
  Author: Arseniy Obolenskiy <arseniy.obolenskiy at amd.com>
  Date:   2026-06-26 (Fri, 26 Jun 2026)

  Changed paths:
    M llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp
    M llvm/test/CodeGen/SPIRV/hlsl-intrinsics/reversebits.ll

  Log Message:
  -----------
  [SPIR-V] Fix correction shift for i8 bitreverse in shader mode (#203829)

selectBitreverse16 hardcoded the post-reverse shift to 16, but it also
handles i8, where the reversed bits land in [31:24] and a shift of 16
truncated to always 0

Compute the shift as `32 - bitwidth` instead



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