Skip to content
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

Codegen wrong for: ptrtoint X* %y to bool #1388

Closed
llvmbot opened this issue Nov 28, 2006 · 1 comment
Closed

Codegen wrong for: ptrtoint X* %y to bool #1388

llvmbot opened this issue Nov 28, 2006 · 1 comment
Labels
bugzilla Issues migrated from bugzilla llvm:codegen miscompilation

Comments

@llvmbot
Copy link
Collaborator

llvmbot commented Nov 28, 2006

Bugzilla Link 1016
Resolution FIXED
Resolved on Feb 22, 2010 12:43
Version trunk
OS All
Attachments bugpoint reduced test case, llvm assembly corresponding to reduced test case, generated x86 assembly code
Reporter LLVM Bugzilla Contributor

Extended Description

For this code:
bb122:
%tmp124 = ptrtoint %struct.TypHeader* %hdR to bool
%i.3.in.in = select bool %tmp124, %struct.TypHeader* %hdR, %struct.TypHeader* %hdL
%hdR_addr.0 = select bool %tmp124, %struct.TypHeader* %hdL, %struct.TypHeader*
%hdR

llc is generating:
.BB1_3: #bb122
movl %eax, %ebx
# TRUNCATE movb %bl, %bl
testb %bl, %bl
movl %eax, %edi
cmovne %esi, %edi
testb %bl, %bl
cmovne %eax, %esi

It looks like the recent DAGCombiner changes missed a case for the select
instruction.

Test cases will be attached.

@lattner
Copy link
Collaborator

lattner commented Nov 28, 2006

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla llvm:codegen miscompilation
Projects
None yet
Development

No branches or pull requests

2 participants