llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.48k stars 11.77k forks source link

constmerge is order dependent #9350

Closed llvmbot closed 13 years ago

llvmbot commented 13 years ago
Bugzilla Link 8978
Resolution FIXED
Resolved on Jan 15, 2011 12:33
Version trunk
OS All
Reporter LLVM Bugzilla Contributor
CC @nlewycky

Extended Description

constmerge will optimize

%struct.foobar = type { i32 } @​bar.d = constant %struct.foobar zeroinitializer, align 4 @​foo.d = internal constant %struct.foobar zeroinitializer, align 4 define i32 @​main() nounwind ssp { entry: %call2 = tail call i32 @​zed(%struct.foobar @​foo.d, %struct.foobar @​bar.d) nounwind ret i32 0 }

but swapping the positions of bar.d and foo.d causes it to miss the opportunity.

nlewycky commented 13 years ago

Fixed in http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20110110/115247.html

llvmbot commented 13 years ago

assigned to @nlewycky