[llvm] 7927c4c - [X86] Add test cases for PR57549. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 5 13:13:12 PDT 2022
Author: Craig Topper
Date: 2022-09-05T13:12:18-07:00
New Revision: 7927c4c5ce8cd5eae07fce12199f979d8586cec2
URL: https://github.com/llvm/llvm-project/commit/7927c4c5ce8cd5eae07fce12199f979d8586cec2
DIFF: https://github.com/llvm/llvm-project/commit/7927c4c5ce8cd5eae07fce12199f979d8586cec2.diff
LOG: [X86] Add test cases for PR57549. NFC
Added:
Modified:
llvm/test/CodeGen/X86/extmul128.ll
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/X86/extmul128.ll b/llvm/test/CodeGen/X86/extmul128.ll
index 09ad58029b94a..a7f2959a23c2c 100644
--- a/llvm/test/CodeGen/X86/extmul128.ll
+++ b/llvm/test/CodeGen/X86/extmul128.ll
@@ -23,3 +23,33 @@ define i128 @i64_zext_i128(i64 %a, i64 %b) {
%cc = mul i128 %aa, %bb
ret i128 %cc
}
+define i128 @i64_zext_sext_i128(i64 %a, i64 %b) {
+; CHECK-LABEL: i64_zext_sext_i128:
+; CHECK: # %bb.0:
+; CHECK-NEXT: movq %rdi, %rax
+; CHECK-NEXT: mulq %rsi
+; CHECK-NEXT: sarq $63, %rsi
+; CHECK-NEXT: imulq %rdi, %rsi
+; CHECK-NEXT: addq %rsi, %rdx
+; CHECK-NEXT: retq
+ %aa = zext i64 %a to i128
+ %bb = sext i64 %b to i128
+ %cc = mul i128 %aa, %bb
+ ret i128 %cc
+}
+
+define i128 @i64_sext_zext_i128(i64 %a, i64 %b) {
+; CHECK-LABEL: i64_sext_zext_i128:
+; CHECK: # %bb.0:
+; CHECK-NEXT: movq %rdi, %rax
+; CHECK-NEXT: movq %rdi, %rcx
+; CHECK-NEXT: sarq $63, %rcx
+; CHECK-NEXT: mulq %rsi
+; CHECK-NEXT: imulq %rsi, %rcx
+; CHECK-NEXT: addq %rcx, %rdx
+; CHECK-NEXT: retq
+ %aa = sext i64 %a to i128
+ %bb = zext i64 %b to i128
+ %cc = mul i128 %aa, %bb
+ ret i128 %cc
+}
More information about the llvm-commits
mailing list