[PATCH] D49919: [InstCombine] Fold Select with OR condition
Dávid Bolvanský via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 27 09:25:19 PDT 2018
xbolva00 created this revision.
xbolva00 added a reviewer: spatel.
Herald added a subscriber: llvm-commits.
Fold
%A = icmp ne i8 %X, %V1
%B = icmp ne i8 %X, %V2
%C = or i1 %A, %B
%D = select i1 %C, i8 %X, i8 %V1
ret i8 %D
=>
ret i8 %X
Fixes https://bugs.llvm.org/show_bug.cgi?id=38334
Proof: https://rise4fun.com/Alive/jB8
Repository:
rL LLVM
https://reviews.llvm.org/D49919
Files:
lib/Transforms/InstCombine/InstCombineSelect.cpp
test/Transforms/InstCombine/select-or-cmp.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49919.157701.patch
Type: text/x-patch
Size: 3138 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180727/fc6d623e/attachment.bin>
More information about the llvm-commits
mailing list