Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

[LoopVectorizer] crash with -force-vector-width=2 #39052

Open Quuxplusone opened 5 years ago

Quuxplusone commented 5 years ago
Bugzilla Link PR40080
Status NEW
Importance P enhancement
Reported by Jonas Paulsson (paulsson@linux.vnet.ibm.com)
Reported on 2018-12-18 05:47:28 -0800
Last modified on 2018-12-21 20:17:36 -0800
Version trunk
Hardware PC Linux
CC ditaliano@apple.com, hfinkel@anl.gov, hideki.saito@intel.com, llvm-bugs@lists.llvm.org, llvm-dev@redking.me.uk, paulsson@linux.vnet.ibm.com, uweigand@de.ibm.com
Fixed by commit(s)
Attachments tc_LV_width2.ll (11961 bytes, text/plain)
Blocks
Blocked by
See also
Created attachment 21245
reduced testcase

This test case contains a loop with a load that gets a disabling (300000) cost,
so normally this would not get vectorized.

Still, if vectorization is forced bad code is generated, which should probably
be investigated:

opt -mtriple=s390x-unknown-linux -mcpu=z13 -o out.opt.ll tc_LV_width2.ll  -O3 -
S -force-vector-width=2 -unroll-count=1

Instruction does not dominate all uses!
  %17 = phi <2 x double> [ %10, %pred.load.continue ], [ %16, %pred.load.if3 ]
  %2 = shufflevector <2 x double> %vector.recur, <2 x double> %17, <2 x i32> <i32 1, i32 2>
Quuxplusone commented 5 years ago

Attached tc_LV_width2.ll (11961 bytes, text/plain): reduced testcase