Check bool attribute value in getOptionalBoolLoopAttribute.
authorAlina Sbirlea <asbirlea@google.com>
Tue, 29 Jan 2019 22:33:20 +0000 (22:33 +0000)
committerAlina Sbirlea <asbirlea@google.com>
Tue, 29 Jan 2019 22:33:20 +0000 (22:33 +0000)
commitf9027e554a6270ccaec1219ed2c0c194504905db
tree53676914bd402a522e999902840a0796bf8d5bd6
parent37b4ee523bd94da3cf61246fa735522fff248423
Check bool attribute value in getOptionalBoolLoopAttribute.

Summary:
Check the bool value of the attribute in getOptionalBoolLoopAttribute
not just its existance.
Eliminates the warning noise generated when vectorization is explicitly disabled.

Reviewers: Meinersbur, hfinkel, dmgreen

Subscribers: jlebar, sanjoy, llvm-commits

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

llvm-svn: 352555
llvm/lib/Transforms/Utils/LoopUtils.cpp
llvm/test/Transforms/LoopVectorize/no_switch_disable_vectorization.ll [new file with mode: 0644]