[all-commits] [llvm/llvm-project] f089da: [AMDGPU] Optimize i64 uitofp for unsigned byte values

Harrison Hao via All-commits all-commits at lists.llvm.org
Fri Sep 11 02:44:16 PDT 2026


  Branch: refs/heads/users/harrisonGPU/optimize-uitofp-ubyte
  Home:   https://github.com/llvm/llvm-project
  Commit: f089da795e3b4013d5f20c29ca039a8c87253bb9
      https://github.com/llvm/llvm-project/commit/f089da795e3b4013d5f20c29ca039a8c87253bb9
  Author: Harrison Hao <tsworld1314 at gmail.com>
  Date:   2026-09-11 (Fri, 11 Sep 2026)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
    M llvm/lib/Target/AMDGPU/AMDGPUISelLowering.h
    M llvm/test/CodeGen/AMDGPU/cvt_f32_ubyte.ll

  Log Message:
  -----------
  [AMDGPU] Optimize i64 uitofp for unsigned byte values

Use v_cvt_f32_ubyte0 when the i64 source is known to fit in an unsigned
byte.
For example:

  uitofp (and i64 %x, 255) to float

This avoids the generic i64 to f32 expansion.



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