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

missed bitcast optimization #1635

Closed
llvmbot opened this issue Mar 21, 2007 · 5 comments
Closed

missed bitcast optimization #1635

llvmbot opened this issue Mar 21, 2007 · 5 comments
Assignees
Labels
bugzilla Issues migrated from bugzilla code-quality

Comments

@llvmbot
Copy link
Collaborator

llvmbot commented Mar 21, 2007

Bugzilla Link 1263
Resolution FIXED
Resolved on Feb 22, 2010 12:51
Version 1.0
OS All
Attachments Small but not completely reduced testcase
Reporter LLVM Bugzilla Contributor

Extended Description

In the attached .ll you can find:
%tmp64 = bitcast i32* %tmp1 to { i32 }* ; <{ i32 }> [#uses=1]
%tmp65 = getelementptr { i32 }
%tmp64, i32 0, i32 0 ;
<i32*> [#uses=1]
Thus %tmp65 is equal to %tmp1, but the optimizers miss this. This strange
construction was produced by llvm-convert, or so it seems. I will try to
find out why it is being produced in the first place.

@llvmbot
Copy link
Collaborator Author

llvmbot commented Mar 21, 2007

assigned to @lattner

@lattner
Copy link
Collaborator

lattner commented Mar 25, 2007

Nice catch. Testcase here: Transforms/InstCombine/cast2.ll:test3

Patch here:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070319/046249.html

-Chris

@llvmbot
Copy link
Collaborator Author

llvmbot commented Mar 29, 2007

Actually, this could be more general: trailing zeros can be eliminated,
at least if all indices are constant. For example, indices "1,0" could
be turned into "1" plus a bitcast.

@lattner
Copy link
Collaborator

lattner commented Mar 29, 2007

Of course. Again, the goal isn't to reimplement instcombine :)

@llvmbot
Copy link
Collaborator Author

llvmbot commented Nov 27, 2021

mentioned in issue llvm/llvm-bugzilla-archive#5167

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
troelsbjerre pushed a commit to troelsbjerre/llvm-project that referenced this issue Jan 10, 2024
…2e98cb7f1fa52617b71f4b94b11a4

[lldb] Fix the last remaining tests not inheriting TCC permissions
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 code-quality
Projects
None yet
Development

No branches or pull requests

2 participants