diff options
author | Sanjoy Das <sanjoy@playingwithpointers.com> | 2015-11-26 01:16:05 +0000 |
---|---|---|
committer | Sanjoy Das <sanjoy@playingwithpointers.com> | 2015-11-26 01:16:05 +0000 |
commit | bcd150362aff56aafdecb5545b36a50c00c63cd5 (patch) | |
tree | 2a33305e568d5cbc9fe1735a13e543ba22965837 /llvm/test/Feature/OperandBundles/function-attrs.ll | |
parent | 5cad22519d7e70b7fd78db348e56314360b625ee (diff) | |
download | bcm5719-llvm-bcd150362aff56aafdecb5545b36a50c00c63cd5.tar.gz bcm5719-llvm-bcd150362aff56aafdecb5545b36a50c00c63cd5.zip |
[OperandBundles] Treat "deopt" operand bundles specially
Teach LLVM optimize to more precisely in the presence of "deopt" operand
bundles. "deopt" operand bundles imply that the call they're attached
to is at least `readonly` (i.e. they don't imply clobber semantics), and
they don't capture their bundle operands.
llvm-svn: 254118
Diffstat (limited to 'llvm/test/Feature/OperandBundles/function-attrs.ll')
-rw-r--r-- | llvm/test/Feature/OperandBundles/function-attrs.ll | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/test/Feature/OperandBundles/function-attrs.ll b/llvm/test/Feature/OperandBundles/function-attrs.ll index 3d429b3e9d9..808f396fed8 100644 --- a/llvm/test/Feature/OperandBundles/function-attrs.ll +++ b/llvm/test/Feature/OperandBundles/function-attrs.ll @@ -22,3 +22,12 @@ define void @test_1(i32* %x) { call void @f_readnone() [ "foo"(i32* %x) ] ret void } + +define void @test_2(i32* %x) { +; The "deopt" operand bundle does not capture or write to %x. + +; CHECK-LABEL: define void @test_2(i32* nocapture readonly %x) + entry: + call void @f_readonly() [ "deopt"(i32* %x) ] + ret void +} |