[llvm] 0277f84 - [M68k] Regenerate divide-by-constant.ll. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 3 12:23:36 PST 2023
Author: Craig Topper
Date: 2023-01-03T12:23:26-08:00
New Revision: 0277f849c36ab6fe122b4fa1ae739e82869b5613
URL: https://github.com/llvm/llvm-project/commit/0277f849c36ab6fe122b4fa1ae739e82869b5613
DIFF: https://github.com/llvm/llvm-project/commit/0277f849c36ab6fe122b4fa1ae739e82869b5613.diff
LOG: [M68k] Regenerate divide-by-constant.ll. NFC
Division algorithm was improved by D140750.
Fixes #59791.
Added:
Modified:
llvm/test/CodeGen/M68k/Arith/divide-by-constant.ll
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/M68k/Arith/divide-by-constant.ll b/llvm/test/CodeGen/M68k/Arith/divide-by-constant.ll
index 4711ff6e648a3..9976875ddf3b7 100644
--- a/llvm/test/CodeGen/M68k/Arith/divide-by-constant.ll
+++ b/llvm/test/CodeGen/M68k/Arith/divide-by-constant.ll
@@ -39,10 +39,9 @@ define zeroext i8 @test3(i8 zeroext %x, i8 zeroext %c) {
; CHECK-NEXT: ; %bb.0: ; %entry
; CHECK-NEXT: move.b (11,%sp), %d0
; CHECK-NEXT: and.l #255, %d0
-; CHECK-NEXT: mulu #-21845, %d0
+; CHECK-NEXT: mulu #21846, %d0
; CHECK-NEXT: lsr.l #8, %d0
; CHECK-NEXT: lsr.l #8, %d0
-; CHECK-NEXT: lsr.w #1, %d0
; CHECK-NEXT: and.l #65535, %d0
; CHECK-NEXT: rts
entry:
@@ -127,11 +126,9 @@ define i8 @test8(i8 %x) nounwind {
; CHECK: ; %bb.0:
; CHECK-NEXT: move.b (7,%sp), %d0
; CHECK-NEXT: and.l #255, %d0
-; CHECK-NEXT: lsr.w #1, %d0
-; CHECK-NEXT: mulu #26887, %d0
+; CHECK-NEXT: mulu #841, %d0
; CHECK-NEXT: lsr.l #8, %d0
; CHECK-NEXT: lsr.l #8, %d0
-; CHECK-NEXT: lsr.w #4, %d0
; CHECK-NEXT: ; kill: def $bd0 killed $bd0 killed $d0
; CHECK-NEXT: rts
%div = udiv i8 %x, 78
@@ -143,10 +140,9 @@ define i8 @test9(i8 %x) nounwind {
; CHECK: ; %bb.0:
; CHECK-NEXT: move.b (7,%sp), %d0
; CHECK-NEXT: and.l #255, %d0
-; CHECK-NEXT: mulu #18079, %d0
+; CHECK-NEXT: mulu #565, %d0
; CHECK-NEXT: lsr.l #8, %d0
; CHECK-NEXT: lsr.l #8, %d0
-; CHECK-NEXT: lsr.w #5, %d0
; CHECK-NEXT: ; kill: def $bd0 killed $bd0 killed $d0
; CHECK-NEXT: rts
%div = udiv i8 %x, 116
More information about the llvm-commits
mailing list