]> granicus.if.org Git - llvm/commitdiff
Removing potentially error-prone fallthrough. NFC
authorMarcello Maggioni <hayarms@gmail.com>
Sat, 14 Jan 2017 07:28:47 +0000 (07:28 +0000)
committerMarcello Maggioni <hayarms@gmail.com>
Sat, 14 Jan 2017 07:28:47 +0000 (07:28 +0000)
This fallthrough if other cases are added between fabs and default
could cause fabs to fall to the next case resulting in a bug.
Better getting rid of it immediately just to be sure.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292003 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/InstructionSimplify.cpp

index 796e6e444980d64cf53cde02940d178123fc88e7..6c731c30c4c5860687b9ffa8eebd5dc9592e5af7 100644 (file)
@@ -4267,6 +4267,7 @@ static Value *SimplifyIntrinsic(Function *F, IterTy ArgBegin, IterTy ArgEnd,
     case Intrinsic::fabs: {
       if (SignBitMustBeZero(*ArgBegin, Q.TLI))
         return *ArgBegin;
+      return nullptr;
     }
     default:
       return nullptr;