[PATCH] D29075: Canonicalize guards for NOT OR condition
Artur Pilipenko via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 25 00:30:05 PST 2017
apilipenko added inline comments.
================
Comment at: lib/Transforms/InstCombine/InstCombineCalls.cpp:2900-2905
+ CallInst *GuardA = Builder->CreateCall(GuardIntrinsic, Builder->CreateNot(A),
+ {DeoptOB}, II->getName());
+ CallInst *GuardB = Builder->CreateCall(GuardIntrinsic, Builder->CreateNot(B),
+ {DeoptOB}, II->getName());
+ GuardA->setCallingConv(II->getCallingConv());
+ GuardB->setCallingConv(II->getCallingConv());
----------------
Maybe:
```
auto CC = II->getCallingConv()
Builder->CreateCall(A)->setCallingConv(CC)
Builder->CreateCall(B)->setCallingConv(CC)
```
================
Comment at: test/Transforms/InstCombine/call-guard.ll:42
+
+define void @test_guard_not_or(i1 %A, i1 %B) {
+; CHECK-LABEL: @test_guard_not_or(
----------------
Please add a test for non-default calling convention.
https://reviews.llvm.org/D29075
More information about the llvm-commits
mailing list