Changeset View
Changeset View
Standalone View
Standalone View
llvm/test/ThinLTO/X86/cfi-devirt.ll
; REQUIRES: x86-registered-target | ; REQUIRES: x86-registered-target | ||||
; Test CFI devirtualization through the thin link and backend. | ; Test CFI devirtualization through the thin link and backend. | ||||
; RUN: opt -thinlto-bc -thinlto-split-lto-unit -o %t.o %s | ; RUN: opt -thinlto-bc -thinlto-split-lto-unit -o %t.o %s | ||||
; Legacy PM | ; Legacy PM | ||||
; RUN: llvm-lto2 run %t.o -save-temps -pass-remarks=. \ | ; RUN: llvm-lto2 run %t.o -save-temps -pass-remarks=. \ | ||||
; RUN: -whole-program-visibility \ | |||||
; RUN: -o %t3 \ | ; RUN: -o %t3 \ | ||||
; RUN: -r=%t.o,test,px \ | ; RUN: -r=%t.o,test,px \ | ||||
; RUN: -r=%t.o,_ZN1A1nEi,p \ | ; RUN: -r=%t.o,_ZN1A1nEi,p \ | ||||
; RUN: -r=%t.o,_ZN1B1fEi,p \ | ; RUN: -r=%t.o,_ZN1B1fEi,p \ | ||||
; RUN: -r=%t.o,_ZN1C1fEi,p \ | ; RUN: -r=%t.o,_ZN1C1fEi,p \ | ||||
; RUN: -r=%t.o,empty,p \ | ; RUN: -r=%t.o,empty,p \ | ||||
; RUN: -r=%t.o,_ZTV1B, \ | ; RUN: -r=%t.o,_ZTV1B, \ | ||||
; RUN: -r=%t.o,_ZTV1C, \ | ; RUN: -r=%t.o,_ZTV1C, \ | ||||
; RUN: -r=%t.o,_ZN1A1nEi, \ | ; RUN: -r=%t.o,_ZN1A1nEi, \ | ||||
; RUN: -r=%t.o,_ZN1B1fEi, \ | ; RUN: -r=%t.o,_ZN1B1fEi, \ | ||||
; RUN: -r=%t.o,_ZN1C1fEi, \ | ; RUN: -r=%t.o,_ZN1C1fEi, \ | ||||
; RUN: -r=%t.o,_ZTV1B,px \ | ; RUN: -r=%t.o,_ZTV1B,px \ | ||||
; RUN: -r=%t.o,_ZTV1C,px 2>&1 | FileCheck %s --check-prefix=REMARK | ; RUN: -r=%t.o,_ZTV1C,px 2>&1 | FileCheck %s --check-prefix=REMARK | ||||
; RUN: llvm-dis %t3.1.4.opt.bc -o - | FileCheck %s --check-prefix=CHECK-IR | ; RUN: llvm-dis %t3.1.4.opt.bc -o - | FileCheck %s --check-prefix=CHECK-IR | ||||
; New PM | ; New PM | ||||
; RUN: llvm-lto2 run %t.o -save-temps -use-new-pm -pass-remarks=. \ | ; RUN: llvm-lto2 run %t.o -save-temps -use-new-pm -pass-remarks=. \ | ||||
; RUN: -whole-program-visibility \ | |||||
; RUN: -o %t3 \ | ; RUN: -o %t3 \ | ||||
; RUN: -r=%t.o,test,px \ | ; RUN: -r=%t.o,test,px \ | ||||
; RUN: -r=%t.o,_ZN1A1nEi,p \ | ; RUN: -r=%t.o,_ZN1A1nEi,p \ | ||||
; RUN: -r=%t.o,_ZN1B1fEi,p \ | ; RUN: -r=%t.o,_ZN1B1fEi,p \ | ||||
; RUN: -r=%t.o,_ZN1C1fEi,p \ | ; RUN: -r=%t.o,_ZN1C1fEi,p \ | ||||
; RUN: -r=%t.o,empty,p \ | ; RUN: -r=%t.o,empty,p \ | ||||
; RUN: -r=%t.o,_ZTV1B, \ | ; RUN: -r=%t.o,_ZTV1B, \ | ||||
; RUN: -r=%t.o,_ZTV1C, \ | ; RUN: -r=%t.o,_ZTV1C, \ | ||||
; RUN: -r=%t.o,_ZN1A1nEi, \ | ; RUN: -r=%t.o,_ZN1A1nEi, \ | ||||
; RUN: -r=%t.o,_ZN1B1fEi, \ | ; RUN: -r=%t.o,_ZN1B1fEi, \ | ||||
; RUN: -r=%t.o,_ZN1C1fEi, \ | ; RUN: -r=%t.o,_ZN1C1fEi, \ | ||||
; RUN: -r=%t.o,_ZTV1B,px \ | ; RUN: -r=%t.o,_ZTV1B,px \ | ||||
; RUN: -r=%t.o,_ZTV1C,px 2>&1 | FileCheck %s --check-prefix=REMARK | ; RUN: -r=%t.o,_ZTV1C,px 2>&1 | FileCheck %s --check-prefix=REMARK | ||||
; RUN: llvm-dis %t3.1.4.opt.bc -o - | FileCheck %s --check-prefix=CHECK-IR | ; RUN: llvm-dis %t3.1.4.opt.bc -o - | FileCheck %s --check-prefix=CHECK-IR | ||||
; REMARK: single-impl: devirtualized a call to _ZN1A1nEi | ; REMARK: single-impl: devirtualized a call to _ZN1A1nEi | ||||
; Next check that we emit an error when trying to LTO link this module | ; Next check that we emit an error when trying to LTO link this module | ||||
; containing an llvm.type.checked.load (with a split LTO Unit) with one | ; containing an llvm.type.checked.load (with a split LTO Unit) with one | ||||
; that does not have a split LTO Unit. Use -thinlto-distributed-indexes | ; that does not have a split LTO Unit. Use -thinlto-distributed-indexes | ||||
; to ensure it is being caught in the thin link. | ; to ensure it is being caught in the thin link. | ||||
; RUN: opt -thinlto-bc -o %t2.o %S/Inputs/empty.ll | ; RUN: opt -thinlto-bc -o %t2.o %S/Inputs/empty.ll | ||||
; RUN: not llvm-lto2 run %t.o %t2.o -thinlto-distributed-indexes \ | ; RUN: not llvm-lto2 run %t.o %t2.o -thinlto-distributed-indexes \ | ||||
; RUN: -whole-program-visibility \ | |||||
; RUN: -o %t3 \ | ; RUN: -o %t3 \ | ||||
; RUN: -r=%t.o,test,px \ | ; RUN: -r=%t.o,test,px \ | ||||
; RUN: -r=%t.o,_ZN1A1nEi,p \ | ; RUN: -r=%t.o,_ZN1A1nEi,p \ | ||||
; RUN: -r=%t.o,_ZN1B1fEi,p \ | ; RUN: -r=%t.o,_ZN1B1fEi,p \ | ||||
; RUN: -r=%t.o,_ZN1C1fEi,p \ | ; RUN: -r=%t.o,_ZN1C1fEi,p \ | ||||
; RUN: -r=%t.o,empty,p \ | ; RUN: -r=%t.o,empty,p \ | ||||
; RUN: -r=%t.o,_ZTV1B, \ | ; RUN: -r=%t.o,_ZTV1B, \ | ||||
; RUN: -r=%t.o,_ZTV1C, \ | ; RUN: -r=%t.o,_ZTV1C, \ | ||||
▲ Show 20 Lines • Show All 73 Lines • Show Last 20 Lines |