[llvm] [AMDGPU] Remove unnecessary add instructions in ctlz.i8 (PR #77615)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 15 07:33:11 PST 2024


================
@@ -446,6 +446,10 @@ AMDGPUTargetLowering::AMDGPUTargetLowering(const TargetMachine &TM,
       {ISD::CTTZ, ISD::CTTZ_ZERO_UNDEF, ISD::CTLZ, ISD::CTLZ_ZERO_UNDEF},
       MVT::i64, Custom);
 
+  for (auto VT : {MVT::i8, MVT::i16}) {
+    setOperationAction({ISD::CTLZ, ISD::CTLZ_ZERO_UNDEF}, VT, Custom);
----------------
jayfoad wrote:

Nit: don't need braces around a single physical line.

https://github.com/llvm/llvm-project/pull/77615


More information about the llvm-commits mailing list