[llvm] [X86][APX] Use TEST instruction for CLOAD/CSTORE (PR #151160)
    Phoebe Wang via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Jul 30 03:36:52 PDT 2025
    
    
  
================
@@ -162,7 +162,7 @@ entry:
 define void @load_zext(i1 %cond, ptr %b, ptr %p) {
 ; CHECK-LABEL: load_zext:
 ; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    andb $1, %dil
+; CHECK-NEXT:    testb $1, %dil
----------------
phoebewang wrote:
> @phoebewang Then it seems clang generates the worse code than gcc about this.
> 
> https://www.godbolt.org/z/T7djcxv5e
Why worse? It reduces a branch.
https://github.com/llvm/llvm-project/pull/151160
    
    
More information about the llvm-commits
mailing list