Skip to content

LowerTypeTests: Precommit test for generated x86 asm. #143189

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

pcc
Copy link
Contributor

@pcc pcc commented Jun 6, 2025

No description provided.

Created using spr 1.3.6-beta.1
@llvmbot
Copy link
Member

llvmbot commented Jun 6, 2025

@llvm/pr-subscribers-llvm-transforms

Author: Peter Collingbourne (pcc)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/143189.diff

1 Files Affected:

  • (added) llvm/test/Transforms/LowerTypeTests/asm.ll (+20)
diff --git a/llvm/test/Transforms/LowerTypeTests/asm.ll b/llvm/test/Transforms/LowerTypeTests/asm.ll
new file mode 100644
index 0000000000000..b0d27f48698f6
--- /dev/null
+++ b/llvm/test/Transforms/LowerTypeTests/asm.ll
@@ -0,0 +1,20 @@
+; REQUIRES: x86-registered-target
+; RUN: opt -mtriple=x86_64-unknown-linux -S -passes=lowertypetests -lowertypetests-summary-action=import -lowertypetests-read-summary=%S/Inputs/import.yaml %s | llc | FileCheck %s
+
+define void @call(ptr %p) {
+  ; CHECK:      movl $__typeid_allones7_global_addr, %eax
+  ; CHECK-NEXT: movq %rdi, %rcx
+  ; CHECK-NEXT: subq %rax, %rcx
+  ; CHECK-NEXT: rorq $__typeid_allones7_align, %rcx
+  ; CHECK-NEXT: cmpq $__typeid_allones7_size_m1@ABS8, %rcx
+  %x = call i1 @llvm.type.test(ptr %p, metadata !"allones7")
+  br i1 %x, label %t, label %f
+
+t:
+  call void %p()
+  ret void
+
+f:
+  ret void
+}
+

@pcc pcc merged commit faaae66 into main Jun 6, 2025
8 of 9 checks passed
@pcc pcc deleted the users/pcc/spr/lowertypetests-precommit-test-for-generated-x86-asm branch June 6, 2025 19:42
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Jun 6, 2025
rorth pushed a commit to rorth/llvm-project that referenced this pull request Jun 11, 2025
Reviewers: fmayer

Reviewed By: fmayer

Pull Request: llvm#143189
DhruvSrivastavaX pushed a commit to DhruvSrivastavaX/lldb-for-aix that referenced this pull request Jun 12, 2025
Reviewers: fmayer

Reviewed By: fmayer

Pull Request: llvm#143189
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants