[PATCH] Refactor: Simplify boolean expressions in llvm IR
David Blaikie
dblaikie at gmail.com
Mon Mar 23 12:54:00 PDT 2015
Looks good - committed in r233005
On Sun, Mar 22, 2015 at 1:08 PM, Richard <legalize at xmission.com> wrote:
> Hi alexfh, dexonsmith, void, rafael, dblaikie, chandlerc,
>
> Simplify boolean expressions using `true` and `false` with `clang-tidy`
>
> http://reviews.llvm.org/D8527
>
> Files:
> lib/IR/Instructions.cpp
>
> Index: lib/IR/Instructions.cpp
> ===================================================================
> --- lib/IR/Instructions.cpp
> +++ lib/IR/Instructions.cpp
> @@ -2553,11 +2553,8 @@
> } else if (DestTy->isPointerTy()) { // Casting to pointer
> if (SrcTy->isPointerTy()) { // Casting from pointer
> return true;
> - } else if (SrcTy->isIntegerTy()) { // Casting from integral
> - return true;
> - } else { // Casting from something
> else
> - return false;
> - }
> + } else
> + return SrcTy->isIntegerTy(); // Casting from integral
> } else if (DestTy->isX86_MMXTy()) {
> if (SrcTy->isVectorTy()) {
> return DestBits == SrcBits; // 64-bit vector to MMX
>
> EMAIL PREFERENCES
> http://reviews.llvm.org/settings/panel/emailpreferences/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150323/e13725a8/attachment.html>
More information about the llvm-commits
mailing list