[all-commits] [llvm/llvm-project] 4a026b: [AMDGCN] Use ZExt when handling indices in insertm...

Peter Rong via All-commits all-commits at lists.llvm.org
Tue Mar 19 21:44:29 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4a026b5092d77426b70ab299447af4dbd5a012d9
      https://github.com/llvm/llvm-project/commit/4a026b5092d77426b70ab299447af4dbd5a012d9
  Author: Peter Rong <peterrong96 at gmail.com>
  Date:   2024-03-19 (Tue, 19 Mar 2024)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
    M llvm/test/CodeGen/AMDGPU/amdgpu-codegenprepare-break-large-phis.ll

  Log Message:
  -----------
  [AMDGCN] Use ZExt when handling indices in insertment element  (#85718)

When i1 true is used as an index, SExt extends it to i32 -1. This would
cause BitVector to overflow.
The language manual have specified that the index shall be treated as an
unsigned number, this patch fixes that.
(https://llvm.org/docs/LangRef.html#insertelement-instruction)

This patch fixes #85717

---------

Signed-off-by: Peter Rong <PeterRong96 at gmail.com>



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