OSDN Git Service

[InstSimplify] fold select (fcmp X, Y), X, Y
authorSanjay Patel <spatel@rotateright.com>
Mon, 5 Nov 2018 21:51:39 +0000 (21:51 +0000)
committerSanjay Patel <spatel@rotateright.com>
Mon, 5 Nov 2018 21:51:39 +0000 (21:51 +0000)
commite357c8b87980be1721791394b173f17ad94e95e9
tree1d6a271c06b8e49429c9e615e74b34343909b906
parent80ce0ad512376158bbd7b8d2cb164d31709dcbd8
[InstSimplify] fold select (fcmp X, Y), X, Y

This is NFCI for InstCombine because it calls InstSimplify,
so I left the tests for this transform there. As noted in
the code comment, we can allow this fold more often by using
FMF and/or value tracking.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346169 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/InstructionSimplify.cpp
lib/Transforms/InstCombine/InstCombineSelect.cpp
test/Transforms/InstSimplify/fcmp-select.ll