Index: llvm/trunk/lib/CodeGen/ScalarizeMaskedMemIntrin.cpp =================================================================== --- llvm/trunk/lib/CodeGen/ScalarizeMaskedMemIntrin.cpp +++ llvm/trunk/lib/CodeGen/ScalarizeMaskedMemIntrin.cpp @@ -586,9 +586,6 @@ } bool ScalarizeMaskedMemIntrin::runOnFunction(Function &F) { - if (skipFunction(F)) - return false; - bool EverMadeChange = false; TTI = &getAnalysis().getTTI(F); Index: llvm/trunk/test/CodeGen/X86/replace_unsupported_masked_mem_intrin.ll =================================================================== --- llvm/trunk/test/CodeGen/X86/replace_unsupported_masked_mem_intrin.ll +++ llvm/trunk/test/CodeGen/X86/replace_unsupported_masked_mem_intrin.ll @@ -1,6 +1,11 @@ ; RUN: llc -O0 -mtriple=x86_64-unknown-linux-gnu -mattr=+sse,+sse2 < %s -o /dev/null ; pr33001 - Check that llc doesn't crash when running with O0 option. +; RUN: llc -O2 -opt-bisect-limit=0 -mtriple=x86_64-unknown-linux-gnu -mattr=+sse,+sse2 < %s -o /dev/null +; Check that llc doesn't crash due to ScalarizeMaskedMemIntring not being run +; because of opt-bisect-limit that in turn causes crash in instruction selection +; for unsupported gather/scatter. + target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu"