bool X86TargetLowering::isTruncateFree(EVT VT1, EVT VT2) const {
if (!VT1.isInteger() || !VT2.isInteger())
return false;
+ if (!VT1.isSimple() || !VT2.isSimple())
+ return false;
unsigned NumBits1 = VT1.getSizeInBits();
unsigned NumBits2 = VT2.getSizeInBits();
return NumBits1 > NumBits2;
%conv1 = ashr i32 %sext, 24
ret i32 %conv1
}
+
+%"class.QPainterPath" = type { double, double, i32 }
+
+define void @PR42880(i32 %t0) {
+; X32-LABEL: PR42880:
+; X32: # %bb.0:
+; X32-NEXT: xorl %eax, %eax
+; X32-NEXT: testb %al, %al
+; X32-NEXT: je .LBB16_1
+; X32-NEXT: # %bb.2: # %if
+; X32-NEXT: .LBB16_1: # %then
+;
+; X64-LABEL: PR42880:
+; X64: # %bb.0:
+; X64-NEXT: xorl %eax, %eax
+; X64-NEXT: testb %al, %al
+; X64-NEXT: je .LBB16_1
+; X64-NEXT: # %bb.2: # %if
+; X64-NEXT: .LBB16_1: # %then
+ %sub = add nsw i32 %t0, -1
+ %add.ptr.i94 = getelementptr inbounds %"class.QPainterPath", %"class.QPainterPath"* null, i32 %sub
+ %x = ptrtoint %"class.QPainterPath"* %add.ptr.i94 to i32
+ %sub2 = sub i32 %x, 0
+ %div = sdiv exact i32 %sub2, 24
+ br i1 undef, label %if, label %then
+
+then:
+ %t1 = xor i32 %div, -1
+ unreachable
+
+if:
+ unreachable
+}