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

            Bug ID: 37463
           Summary: Failure to scalarize comparison of
                    unform-op(broadcast) vs broadcast
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedb...@nondot.org
          Reporter: listm...@philipreames.com
                CC: llvm-bugs@lists.llvm.org

In the example below, we should be able to replace the sequence with a
broadcast of a scalar comparison:
  %52 = insertelement <4 x i64*> undef, i64* %51, i32 0                         
  %53 = shufflevector <4 x i64*> %52, <4 x i64*> undef, <4 x i32>
zeroinitializer                                                                 
  %54 = lshr <4 x i64> %33, <i64 21, i64 21, i64 21, i64 21>                    
  %55 = insertelement <4 x i64> undef, i64 %35, i32 0                           
  %56 = shufflevector <4 x i64> %55, <4 x i64> undef, <4 x i32> zeroinitializer 
  %57 = icmp eq <4 x i64> %56, %54

Even if we don't get to the scalar form, we definitely should be sinking the
lsr to be a scalar computation before the broadcast given both arguments are
broadcasts of scalars.

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

Reply via email to