[PATCH] D20144: Fix constant folding of addrspacecast
David Majnemer via llvm-commits
llvm-commits at lists.llvm.org
Fri May 20 15:56:32 PDT 2016
majnemer added a comment.
Er, I'm still very confused here. Let's take your example `@constant_fold_inttoptr`.
trunk turns this into:
define void @constant_fold_inttoptr() {
store i32 7, i32 addrspace(4)* addrspacecast (i32 addrspace(3)* inttoptr (i32 -1 to i32 addrspace(3)*) to i32 addrspace(4)*)
ret void
}
I'm not seeing an argument as to why this is not desirable. The target should still have all the information it needs, the only difference I see is that contains an additional `ConstantExpr` instead of an additional `Instruction`.
http://reviews.llvm.org/D20144
More information about the llvm-commits
mailing list