[llvm] 21d8f66 - [X86] Add test caes for pr46585. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 4 12:03:01 PDT 2020
Author: Craig Topper
Date: 2020-07-04T11:42:50-07:00
New Revision: 21d8f66d20b813edadac84b12cc83b66eaeae630
URL: https://github.com/llvm/llvm-project/commit/21d8f66d20b813edadac84b12cc83b66eaeae630
DIFF: https://github.com/llvm/llvm-project/commit/21d8f66d20b813edadac84b12cc83b66eaeae630.diff
LOG: [X86] Add test caes for pr46585. NFC
Added:
llvm/test/CodeGen/X86/pr46585.ll
Modified:
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/X86/pr46585.ll b/llvm/test/CodeGen/X86/pr46585.ll
new file mode 100644
index 000000000000..65cd6b897ea3
--- /dev/null
+++ b/llvm/test/CodeGen/X86/pr46585.ll
@@ -0,0 +1,35 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc < %s -mtriple=x86_64-apple-macosx | FileCheck %s
+
+ at global = external local_unnamed_addr global i8
+ at global.1 = external local_unnamed_addr global i64
+
+define void @spam() local_unnamed_addr {
+; CHECK-LABEL: spam:
+; CHECK: ## %bb.0: ## %bb
+; CHECK-NEXT: pmovmskb %xmm0, %eax
+; CHECK-NEXT: testb %al, %al
+; CHECK-NEXT: je LBB0_2
+; CHECK-NEXT: ## %bb.1: ## %bb9
+; CHECK-NEXT: movq _global.1@{{.*}}(%rip), %rax
+; CHECK-NEXT: movq $1, (%rax)
+; CHECK-NEXT: LBB0_2: ## %bb8
+; CHECK-NEXT: retq
+bb:
+ %tmp = load i8, i8* @global, align 1
+ %tmp1 = and i8 %tmp, 1
+ %tmp2 = insertelement <8 x i8> undef, i8 %tmp1, i32 0
+ %tmp3 = ashr <8 x i8> %tmp2, <i8 7, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0>
+ %tmp4 = shufflevector <8 x i8> %tmp3, <8 x i8> undef, <8 x i32> zeroinitializer
+ %tmp5 = icmp slt <8 x i8> %tmp4, zeroinitializer
+ %tmp6 = bitcast <8 x i1> %tmp5 to i8
+ %tmp7 = icmp eq i8 %tmp6, 0
+ br i1 %tmp7, label %bb8, label %bb9
+
+bb8: ; preds = %bb9, %bb
+ ret void
+
+bb9: ; preds = %bb
+ store i64 1, i64* @global.1, align 8
+ br label %bb8
+}
More information about the llvm-commits
mailing list