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

Large constant materialized twice #18158

Closed
llvmbot opened this issue Nov 2, 2013 · 2 comments
Closed

Large constant materialized twice #18158

llvmbot opened this issue Nov 2, 2013 · 2 comments
Labels
bugzilla Issues migrated from bugzilla llvm:codegen

Comments

@llvmbot
Copy link
Collaborator

llvmbot commented Nov 2, 2013

Bugzilla Link 17784
Version trunk
OS All
Reporter LLVM Bugzilla Contributor

Extended Description

Given

#include <stdint.h>
uint64_t val, *p;
extern uint64_t xtr( uint64_t);

uint64_t caller() {
uint64_t x;
p = &val;
x = 12345123400L;
*p = x;
return xtr(x);
}

clang produces

movq	%rax, (%rcx)
movabsq	$12345123400, %rcx      ## imm = 0x2DFD3A248
movq	%rcx, (%rax)
movabsq	$12345123400, %rdi      ## imm = 0x2DFD3A248

There was a thread about this bug in:

http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-August/064535.html

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 9, 2021
@JOE1994
Copy link
Member

JOE1994 commented Dec 2, 2023

With clang trunk, large constant is no longer materialized twice.

@JOE1994 JOE1994 closed this as completed Dec 2, 2023
@fhahn
Copy link
Contributor

fhahn commented Dec 2, 2023

Thanks for checking and closing!

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
Projects
None yet
Development

No branches or pull requests

3 participants