Author: Simon Pilgrim Date: 2026-11-08T15:42:03+01:00 New Revision: abce5cb2f0cae3a31bc1442a0c65eab2870ac3c2
URL: https://github.com/llvm/llvm-project/commit/abce5cb2f0cae3a31bc1442a0c65eab2870ac3c2 DIFF: https://github.com/llvm/llvm-project/commit/abce5cb2f0cae3a31bc1442a0c65eab2870ac3c2.diff LOG: [X86] Add baseline test for #236021 (#237155) (cherry picked from commit 6fa91d905f12193ddb624e2374aea1be259d8fb6) Added: llvm/test/CodeGen/X86/pr236021.ll Modified: Removed: ################################################################################ diff --git a/llvm/test/CodeGen/X86/pr236021.ll b/llvm/test/CodeGen/X86/pr236021.ll new file mode 100644 index 00000000000000..5580a459d15f28 --- /dev/null +++ b/llvm/test/CodeGen/X86/pr236021.ll @@ -0,0 +1,40 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py +; RUN: llc < %s -mtriple=i686-- | FileCheck %s --check-prefixes=X86 +; RUN: llc < %s -mtriple=x86_64-- | FileCheck %s --check-prefixes=X64 + +@x = global i128 128 + +define i32 @PR236021() { +; X86-LABEL: PR236021: +; X86: # %bb.0: +; X86-NEXT: xorl %eax, %eax +; X86-NEXT: movl $63, %ecx +; X86-NEXT: cmpl x, %ecx +; X86-NEXT: movl $0, %ecx +; X86-NEXT: sbbl x+4, %ecx +; X86-NEXT: movl $1, %ecx +; X86-NEXT: sbbl x+8, %ecx +; X86-NEXT: sbbl x+12, %eax +; X86-NEXT: setge %al +; X86-NEXT: movzbl %al, %eax +; X86-NEXT: retl +; +; X64-LABEL: PR236021: +; X64: # %bb.0: +; X64-NEXT: movq x@GOTPCREL(%rip), %rax +; X64-NEXT: movl $63, %ecx +; X64-NEXT: cmpq (%rax), %rcx +; X64-NEXT: movl $1, %ecx +; X64-NEXT: sbbq 8(%rax), %rcx +; X64-NEXT: setl %al +; X64-NEXT: notb %al +; X64-NEXT: movzbl %al, %eax +; X64-NEXT: andl $1, %eax +; X64-NEXT: retq + %v = load i128, ptr @x + %a = insertelement <2 x i128> zeroinitializer, i128 %v, i32 0 + %cmp = icmp sge <2 x i128> %a, splat (i128 64) + %r = extractelement <2 x i1> %cmp, i32 0 + %ret = select i1 %r, i32 0, i32 1 + ret i32 %ret +} _______________________________________________ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
