[PATCH] D16143: Don't propagate dereferenceable attribute through gc.relocate in InstCombine
Artur Pilipenko via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 11 03:27:19 PST 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL260509: Don't propagate dereferenceable attribute through gc.relocate in InstCombine (authored by apilipenko).
Changed prior to commit:
http://reviews.llvm.org/D16143?vs=44747&id=47623#toc
Repository:
rL LLVM
http://reviews.llvm.org/D16143
Files:
llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp
llvm/trunk/test/Transforms/InstCombine/gc.relocate.ll
Index: llvm/trunk/test/Transforms/InstCombine/gc.relocate.ll
===================================================================
--- llvm/trunk/test/Transforms/InstCombine/gc.relocate.ll
+++ llvm/trunk/test/Transforms/InstCombine/gc.relocate.ll
@@ -9,17 +9,6 @@
declare token @llvm.experimental.gc.statepoint.p0f_i1f(i64, i32, i1 ()*, i32, i32, ...)
declare i32 addrspace(1)* @llvm.experimental.gc.relocate.p1i32(token, i32, i32)
-define i32 addrspace(1)* @deref(i32 addrspace(1)* dereferenceable(8) %dparam) gc "statepoint-example" {
-; Checks that a dereferenceabler pointer
-; CHECK-LABEL: @deref
-; CHECK: call dereferenceable(8)
-entry:
- %load = load i32, i32 addrspace(1)* %dparam
- %tok = tail call token (i64, i32, i1 ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_i1f(i64 0, i32 0, i1 ()* @return_i1, i32 0, i32 0, i32 0, i32 0, i32 addrspace(1)* %dparam)
- %relocate = call i32 addrspace(1)* @llvm.experimental.gc.relocate.p1i32(token %tok, i32 7, i32 7)
- ret i32 addrspace(1)* %relocate
-}
-
define i32 @explicit_nonnull(i32 addrspace(1)* nonnull %dparam) gc "statepoint-example" {
; Checks that a nonnull pointer
; CHECK-LABEL: @explicit_nonnull
Index: llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp
===================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp
@@ -1850,12 +1850,6 @@
// isKnownNonNull -> nonnull attribute
if (isKnownNonNullAt(DerivedPtr, II, DT, TLI))
II->addAttribute(AttributeSet::ReturnIndex, Attribute::NonNull);
-
- // isDereferenceablePointer -> deref attribute
- if (isDereferenceablePointer(DerivedPtr, DL))
- if (Argument *A = dyn_cast<Argument>(DerivedPtr))
- II->addDereferenceableAttr(AttributeSet::ReturnIndex,
- A->getDereferenceableBytes());
}
// TODO: bitcast(relocate(p)) -> relocate(bitcast(p))
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16143.47623.patch
Type: text/x-patch
Size: 2023 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160211/f7eaa732/attachment.bin>
More information about the llvm-commits
mailing list