[PATCH] D16022: AMDGPU: Pattern match ffbh pattern to instruction.

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 8 19:20:51 PST 2016


arsenm created this revision.
arsenm added a reviewer: tstellarAMD.
arsenm added a subscriber: llvm-commits.
Herald added subscribers: rampitec, arsenm.

The hardware instruction's output on 0 is -1 rather than 32.
Eliminate a test and select to -1. This removes an extra instruction
from the compatability function with HSAIL's firstbit instruction.

http://reviews.llvm.org/D16022

Files:
  lib/Target/AMDGPU/AMDGPUISelLowering.cpp
  lib/Target/AMDGPU/AMDGPUISelLowering.h
  lib/Target/AMDGPU/AMDGPUInstrInfo.td
  lib/Target/AMDGPU/EvergreenInstructions.td
  lib/Target/AMDGPU/SIISelLowering.cpp
  lib/Target/AMDGPU/SIInstructions.td
  test/CodeGen/AMDGPU/ctlz.ll
  test/CodeGen/AMDGPU/ctlz_zero_undef.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16022.44395.patch
Type: text/x-patch
Size: 16012 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160109/66bb1e40/attachment.bin>


More information about the llvm-commits mailing list