https://bugs.llvm.org/show_bug.cgi?id=32446
Bug ID: 32446
Summary: [NewGVN] Store-to-Load forwarding failure if load is
of different type
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Scalar Optimizations
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Consider:
```
define i64 @foo(double %bar) {
%slot = alloca double
store double %bar, double *%slot
%bcast = bitcast double *%slot to i64*
%ival = load i64, i64* %bcast
ret i64 %ival
}
```
With regular GVN:
$ opt -gvn -dse simple.ll -S
; ModuleID = 'simple.ll'
source_filename = "simple.ll"
define i64 @foo(double %bar) {
%1 = bitcast double %bar to i64
ret i64 %1
}
NewGVN:
define i64 @foo(double %bar) {
%slot = alloca double
store double %bar, double* %slot
%bcast = bitcast double* %slot to i64*
%ival = load i64, i64* %bcast
ret i64 %ival
}
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs