
It breaks up the function pass manager in the codegen pipeline. With empty parameters, it looks at the -mllvm flag -rewrite-map-file. This is likely not in use. Add a check that we only have one function pass manager in the codegen pipeline. Some tests relied on the fact that we had a module pass somewhere in the codegen pipeline. addr-label.ll crashes on ARM due to this change. This is because a ARMConstantPoolConstant containing a BasicBlock to represent a blockaddress may hold an invalid pointer to a BasicBlock if the blockaddress is invalidated by its BasicBlock getting removed. In that case all referencing blockaddresses are RAUW a constant int. Making ARMConstantPoolConstant::CVal a WeakVH fixes the crash, but I'm not sure that's the right fix. As a workaround, create a barrier right before ISel so that IR optimizations can't happen while a ARMConstantPoolConstant has been created. Reviewed By: rnk, MaskRay, compnerd Differential Revision: https://reviews.llvm.org/D99707
17 lines
513 B
LLVM
17 lines
513 B
LLVM
; RUN: opt -mtriple=x86_64-unknown-unknown -codegenprepare -S < %s 2>&1 | FileCheck %s
|
|
|
|
; Function Attrs: norecurse nounwind readnone uwtable
|
|
define i32 @foo(i32, i32, i32) {
|
|
%4 = and i32 %0, 3
|
|
%5 = icmp eq i32 %4, 1
|
|
%6 = select i1 %5, i32 %1, i32 %2, !prof !1
|
|
; CHECK: br {{.*}}label{{.*}}, label{{.*}}, !prof ![[WT:.*]]
|
|
ret i32 %6
|
|
}
|
|
|
|
!llvm.ident = !{!0}
|
|
|
|
!0 = !{!"clang version 4.0.0 (trunk 279683)"}
|
|
!1 = !{!"branch_weights", i32 1000, i32 1 }
|
|
; CHECK: ![[WT]] = !{!"branch_weights", i32 1000, i32 1}
|