Missed DSE case
| Bugzilla Link | 2599 |
| Resolution | FIXED |
| Resolved on | Jul 28, 2008 11:32 |
| Version | 1.0 |
| OS | All |
| CC | @asl |
Extended Description
DSE should delete a store to a location when the stored value is the same as the loaded one. For example:
void foo(_Complex int *x) { *x = ~*x; }
compiles to:
define void @foo({ i32, i32 }* %x) nounwind {
entry:
getelementptr { i32, i32 }* %x, i32 0, i32 0 ; <i32*>:0 [#uses=2]
load i32* %0, align 4 ;
The load+store to %0 should be nuked, which would happen if DSE deleted the store to %0.
mentioned in issue llvm/llvm-bugzilla-archive#45795
mentioned in issue llvm/llvm-bugzilla-archive#32342
Fixed in r54133.
This shouldn't be hard to catch. I'll poke at it this weekend.