mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-25 14:02:52 +02:00
4a1a429535
Summary: This also adds the first set of tests for operand bundles. The optimizer has not been audited to ensure that it does the right thing with operand bundles. Depends on D12456. Reviewers: reames, chandlerc, majnemer, dexonsmith, kmod, JosephTremoulet, rnk, bogner Subscribers: maksfb, llvm-commits Differential Revision: http://reviews.llvm.org/D12457 llvm-svn: 248551
37 lines
1.0 KiB
LLVM
37 lines
1.0 KiB
LLVM
; RUN: not opt -verify < %s 2>&1 | FileCheck %s
|
|
|
|
; Operand bundles uses are like regular uses, and need to be dominated
|
|
; by their defs.
|
|
|
|
declare void @g()
|
|
|
|
define void @f0(i32* %ptr) {
|
|
; CHECK: Instruction does not dominate all uses!
|
|
; CHECK-NEXT: %x = add i32 42, 1
|
|
; CHECK-NEXT: call void @g() [ "foo"(i32 42, i64 100, i32 %x), "bar"(float 0.000000e+00, i64 100, i32 %l) ]
|
|
|
|
entry:
|
|
%l = load i32, i32* %ptr
|
|
call void @g() [ "foo"(i32 42, i64 100, i32 %x), "bar"(float 0.0, i64 100, i32 %l) ]
|
|
%x = add i32 42, 1
|
|
ret void
|
|
}
|
|
|
|
define void @f1(i32* %ptr) personality i8 3 {
|
|
; CHECK: Instruction does not dominate all uses!
|
|
; CHECK-NEXT: %x = add i32 42, 1
|
|
; CHECK-NEXT: invoke void @g() [ "foo"(i32 42, i64 100, i32 %x), "bar"(float 0.000000e+00, i64 100, i32 %l) ]
|
|
|
|
entry:
|
|
%l = load i32, i32* %ptr
|
|
invoke void @g() [ "foo"(i32 42, i64 100, i32 %x), "bar"(float 0.0, i64 100, i32 %l) ] to label %normal unwind label %exception
|
|
|
|
exception:
|
|
%cleanup = landingpad i8 cleanup
|
|
br label %normal
|
|
|
|
normal:
|
|
%x = add i32 42, 1
|
|
ret void
|
|
}
|