[llvm] r330700 - [CodeGen] Do not allow opt-bisect-limit to skip ScalarizeMaskedMemIntrin.

Andrei Elovikov via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 24 02:24:29 PDT 2018


Author: a.elovikov
Date: Tue Apr 24 02:24:29 2018
New Revision: 330700

URL: http://llvm.org/viewvc/llvm-project?rev=330700&view=rev
Log:
[CodeGen] Do not allow opt-bisect-limit to skip ScalarizeMaskedMemIntrin.

Summary:
The pass is supposed to scalarize such intrinsics if the target does not support
them natively, so if the scalarization does not happen instruction selection
crashes due to inability to lower these intrinsics.

Reviewers: andrew.w.kaylor, craig.topper

Reviewed By: andrew.w.kaylor

Subscribers: llvm-commits

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

Modified:
    llvm/trunk/lib/CodeGen/ScalarizeMaskedMemIntrin.cpp
    llvm/trunk/test/CodeGen/X86/replace_unsupported_masked_mem_intrin.ll

Modified: llvm/trunk/lib/CodeGen/ScalarizeMaskedMemIntrin.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ScalarizeMaskedMemIntrin.cpp?rev=330700&r1=330699&r2=330700&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/ScalarizeMaskedMemIntrin.cpp (original)
+++ llvm/trunk/lib/CodeGen/ScalarizeMaskedMemIntrin.cpp Tue Apr 24 02:24:29 2018
@@ -586,9 +586,6 @@ static void scalarizeMaskedScatter(CallI
 }
 
 bool ScalarizeMaskedMemIntrin::runOnFunction(Function &F) {
-  if (skipFunction(F))
-    return false;
-
   bool EverMadeChange = false;
 
   TTI = &getAnalysis<TargetTransformInfoWrapperPass>().getTTI(F);

Modified: llvm/trunk/test/CodeGen/X86/replace_unsupported_masked_mem_intrin.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/replace_unsupported_masked_mem_intrin.ll?rev=330700&r1=330699&r2=330700&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/replace_unsupported_masked_mem_intrin.ll (original)
+++ llvm/trunk/test/CodeGen/X86/replace_unsupported_masked_mem_intrin.ll Tue Apr 24 02:24:29 2018
@@ -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"
 




More information about the llvm-commits mailing list