summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/InstCombine/InstCombine.h
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2014-08-21 05:14:48 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2014-08-21 05:14:48 +0000
commit5d1aeba2ea7ff1976b85a57d0591b97fd6e33ae0 (patch)
tree4a917e6cfc9e503ee389479d231fcd56dae7f6a3 /llvm/lib/Transforms/InstCombine/InstCombine.h
parent3ced27c835a1fad3f61a467670505bf1a0b39280 (diff)
downloadbcm5719-llvm-5d1aeba2ea7ff1976b85a57d0591b97fd6e33ae0.tar.gz
bcm5719-llvm-5d1aeba2ea7ff1976b85a57d0591b97fd6e33ae0.zip
InstCombine: Fold ((A | B) & C1) ^ (B & C2) -> (A & C1) ^ B if C1^C2=-1
Adapted from a patch by Richard Smith, test-case written by me. llvm-svn: 216157
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombine.h')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombine.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombine.h b/llvm/lib/Transforms/InstCombine/InstCombine.h
index 9e1cc3cb4d2..c8ed7c2b5a6 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombine.h
+++ b/llvm/lib/Transforms/InstCombine/InstCombine.h
@@ -152,6 +152,8 @@ public:
Value *FoldOrOfFCmps(FCmpInst *LHS, FCmpInst *RHS);
Instruction *FoldOrWithConstants(BinaryOperator &I, Value *Op, Value *A,
Value *B, Value *C);
+ Instruction *FoldXorWithConstants(BinaryOperator &I, Value *Op, Value *A,
+ Value *B, Value *C);
Instruction *visitOr(BinaryOperator &I);
Instruction *visitXor(BinaryOperator &I);
Instruction *visitShl(BinaryOperator &I);
OpenPOWER on IntegriCloud