[PATCH] D34921: [ConstantHoisting] Remove dupliate logic in constant hoisting
Leo Li via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 5 15:05:30 PDT 2017
aoli added a comment.
The test I found is in test/Transforms/ConstantHoisting/ARM/bad-cases.ll
define void @avoid_allocas() {
; CHECK-LABEL: @avoid_allocas
; CHECK: %addr1 = alloca i8, i32 1000
; CHECK: %addr2 = alloca i8, i32 1020
%addr1 = alloca i8, i32 1000
%addr2 = alloca i8, i32 1020
br label %elsewhere
elsewhere:
; CHECK: [[BASE:%.*]] = bitcast i32 1000 to i32
; CHECK: alloca i8, i32 [[BASE]]
; CHECK: [[NEXT:%.*]] = add i32 [[BASE]], 20
; CHECK: alloca i8, i32 [[NEXT]]
%addr3 = alloca i8, i32 1000
%addr4 = alloca i8, i32 1020
ret void
}
https://reviews.llvm.org/D34921
More information about the llvm-commits
mailing list