https://bugs.llvm.org/show_bug.cgi?id=36305
Bug ID: 36305
Summary: [DAGCombine] Difference in behaviour for SDIV undef,
%X on scalar and vector types
Product: libraries
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: Common Code Generator Code
Assignee: unassignedb...@nondot.org
Reporter: llvm-...@redking.me.uk
CC: llvm-bugs@lists.llvm.org, spatel+l...@rotateright.com
llvm\test\CodeGen\X86\combine-sdiv.ll
; fold (sdiv undef, x) -> 0
define i32 @combine_sdiv_undef0(i32 %x) {
; CHECK-LABEL: combine_sdiv_undef0:
; CHECK: # %bb.0:
; CHECK-NEXT: xorl %eax, %eax
; CHECK-NEXT: retq
%1 = sdiv i32 undef, %x
ret i32 %1
}
define <4 x i32> @combine_vec_sdiv_undef0(<4 x i32> %x) {
; CHECK-LABEL: combine_vec_sdiv_undef0:
; CHECK: # %bb.0:
; CHECK-NEXT: retq
%1 = sdiv <4 x i32> undef, %x
ret <4 x i32> %1
}
Scalar divisions by undef combine to zero, while vectors combine to undef.
Similar behaviour for udiv, srem, urem.
--
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