]> granicus.if.org Git - llvm/commit
Revert a couple of InstCombine/Guard checkins
authorSanjoy Das <sanjoy@playingwithpointers.com>
Thu, 26 Jan 2017 23:38:11 +0000 (23:38 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Thu, 26 Jan 2017 23:38:11 +0000 (23:38 +0000)
commit78fa56ce60f0a5a7a59f7d52cec7dda965ec100b
treea4be4b3e7dc49fc6bed448da0c87eea3fd2eeab8
parente6f10d34818cd6e43f0268687ab9fb7c39256157
Revert a couple of InstCombine/Guard checkins

This change reverts:

r293061: "[InstCombine] Canonicalize guards for NOT OR condition"
r293058: "[InstCombine] Canonicalize guards for AND condition"

They miscompile cases like:

```
declare void @llvm.experimental.guard(i1, ...)

define void @test_guard_not_or(i1 %A, i1 %B) {
  %C = or i1 %A, %B
  %D = xor i1 %C, true
  call void(i1, ...) @llvm.experimental.guard(i1 %D, i32 20, i32 30)[ "deopt"() ]
  ret void
}
```

because they do transfer the `i32 20, i32 30` parameters to newly
created guard instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293227 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineCalls.cpp
test/Transforms/InstCombine/call-guard.ll