]> granicus.if.org Git - llvm/commit
[IR] SelectInst: add swapValues() utility
authorRoman Lebedev <lebedev.ri@gmail.com>
Thu, 1 Aug 2019 12:31:35 +0000 (12:31 +0000)
committerRoman Lebedev <lebedev.ri@gmail.com>
Thu, 1 Aug 2019 12:31:35 +0000 (12:31 +0000)
commit5ae3769ae0cc68645f467aa579a9b59a9bf590c5
treea61a0cdf1c4ef8d7d6d13e8760167331bd19a145
parent7c938f91eb59655f448b14e863e51d073d49ca27
[IR] SelectInst: add swapValues() utility

Summary:
Sometimes we need to swap true-val and false-val of a `SelectInst`.
Having a function for that is nicer than hand-writing it each time.

Reviewers: spatel, RKSimon, craig.topper, jdoerfert

Reviewed By: jdoerfert

Subscribers: jdoerfert, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D65520

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367547 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/Instructions.h
lib/Transforms/InstCombine/InstCombineAddSub.cpp
lib/Transforms/InstCombine/InstCombineSelect.cpp
lib/Transforms/Instrumentation/ControlHeightReduction.cpp