[llvm] [DAGCombine] Propagate truncate to operands (PR #98666)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 1 16:25:36 PDT 2024
================
@@ -11,62 +11,63 @@
define i8 @t0(i32 %a1_wide_orig, i32 %a2_wide_orig, i32 %inc) nounwind {
; I386-NOCMOV-LABEL: t0:
; I386-NOCMOV: # %bb.0:
-; I386-NOCMOV-NEXT: movl {{[0-9]+}}(%esp), %ecx
-; I386-NOCMOV-NEXT: movl {{[0-9]+}}(%esp), %eax
-; I386-NOCMOV-NEXT: addl %ecx, %eax
-; I386-NOCMOV-NEXT: addl {{[0-9]+}}(%esp), %ecx
+; I386-NOCMOV-NEXT: movzbl {{[0-9]+}}(%esp), %ecx
+; I386-NOCMOV-NEXT: movzbl {{[0-9]+}}(%esp), %eax
+; I386-NOCMOV-NEXT: addb %cl, %al
+; I386-NOCMOV-NEXT: addb {{[0-9]+}}(%esp), %cl
; I386-NOCMOV-NEXT: cmpb %cl, %al
; I386-NOCMOV-NEXT: jg .LBB0_2
; I386-NOCMOV-NEXT: # %bb.1:
; I386-NOCMOV-NEXT: movl %ecx, %eax
; I386-NOCMOV-NEXT: .LBB0_2:
-; I386-NOCMOV-NEXT: # kill: def $al killed $al killed $eax
; I386-NOCMOV-NEXT: retl
;
; I386-CMOV-LABEL: t0:
; I386-CMOV: # %bb.0:
-; I386-CMOV-NEXT: movl {{[0-9]+}}(%esp), %eax
-; I386-CMOV-NEXT: movl {{[0-9]+}}(%esp), %ecx
-; I386-CMOV-NEXT: addl %eax, %ecx
-; I386-CMOV-NEXT: addl {{[0-9]+}}(%esp), %eax
+; I386-CMOV-NEXT: movzbl {{[0-9]+}}(%esp), %eax
+; I386-CMOV-NEXT: movzbl {{[0-9]+}}(%esp), %ecx
+; I386-CMOV-NEXT: addb %al, %cl
+; I386-CMOV-NEXT: addb {{[0-9]+}}(%esp), %al
; I386-CMOV-NEXT: cmpb %al, %cl
+; I386-CMOV-NEXT: movzbl %cl, %ecx
----------------
topperc wrote:
This looks worse
https://github.com/llvm/llvm-project/pull/98666
More information about the llvm-commits
mailing list