[llvm] [CGP] Despeculate ctlz/cttz with "illegal" integer types (PR #137197)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 25 05:47:49 PDT 2025


================
@@ -5,12 +5,44 @@
 ; RUN: llc < %s -mtriple=x86_64-- -mattr=+lzcnt | FileCheck %s --check-prefixes=X64,X64-LZCNT
 
 define i1 @lshr_ctlz_cmpeq_one_i64(i64 %in) nounwind {
-; X86-LABEL: lshr_ctlz_cmpeq_one_i64:
-; X86:       # %bb.0:
-; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax
-; X86-NEXT:    orl {{[0-9]+}}(%esp), %eax
-; X86-NEXT:    sete %al
-; X86-NEXT:    retl
+; X86-BSR-LABEL: lshr_ctlz_cmpeq_one_i64:
----------------
RKSimon wrote:

ok lzcnt-cmp.ll can be removed

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


More information about the llvm-commits mailing list