https://bugs.llvm.org/show_bug.cgi?id=39989

            Bug ID: 39989
           Summary: [LICM]  loads hoisted out of vectorized loop but not
                    from scalar loop.
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Loop Optimizer
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]

Created attachment 21218
  --> https://bugs.llvm.org/attachment.cgi?id=21218&action=edit
reduced testcase

I found a few cases of a loop with loads from loop-invariant addresses that get
vectorized. I am not sure why, but the loads in the vectorized loop get hoisted
by LICM, while those in the scalar loop remain inside the loop.

I wonder why that is - is this a known issue/behaviour or is this something to
be fixed in LICM?

Attached is a reduced test case which is not perfect, but at least has this
behaviour well exhibited in vector.body and (the original scalar) bb27.us.i
loops.

clang -cc1 -triple s390x-ibm-linux -S -save-temps=cwd -fmath-errno -target-cpu
z13 -v -O3 -w -vectorize-loops -vectorize-slp -o out.ll -emit-llvm
tc_licm_vec_scal.ll -mllvm -unroll-count=1

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to