Skip to content

Commit 3c82b86

Browse files
committed
[GlobalISel] Fix depth for calling computeKnownBitsImpl in computeNumSignBitsImpl
1 parent cdd97df commit 3c82b86

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

llvm/lib/CodeGen/GlobalISel/GISelValueTracking.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2046,7 +2046,7 @@ unsigned GISelValueTracking::computeNumSignBitsImpl(Register R,
20462046
// Finally, if we can prove that the top bits of the result are 0's or 1's,
20472047
// use this information.
20482048
KnownBits Known;
2049-
computeKnownBitsImpl(R, Known, DemandedElts, Depth + 1);
2049+
computeKnownBitsImpl(R, Known, DemandedElts, Depth);
20502050
APInt Mask;
20512051
if (Known.isNonNegative()) { // sign bit is 0
20522052
Mask = Known.Zero;

llvm/test/CodeGen/AArch64/aarch64-smull.ll

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -249,20 +249,10 @@ define <2 x i64> @smull_zext_v2i32_v2i64(ptr %A, ptr %B) nounwind {
249249
; CHECK-GI-NEXT: movi d0, #0x00ffff0000ffff
250250
; CHECK-GI-NEXT: mov v1.s[1], v2.s[0]
251251
; CHECK-GI-NEXT: and v0.8b, v1.8b, v0.8b
252-
; CHECK-GI-NEXT: mov w8, v0.s[0]
253-
; CHECK-GI-NEXT: mov w9, v0.s[1]
252+
; CHECK-GI-NEXT: mov v1.s[0], v0.s[0]
253+
; CHECK-GI-NEXT: mov v1.s[1], v0.s[1]
254254
; CHECK-GI-NEXT: ldr d0, [x1]
255-
; CHECK-GI-NEXT: sshll v0.2d, v0.2s, #0
256-
; CHECK-GI-NEXT: fmov d1, x8
257-
; CHECK-GI-NEXT: fmov x11, d0
258-
; CHECK-GI-NEXT: mov v1.d[1], x9
259-
; CHECK-GI-NEXT: mov x9, v0.d[1]
260-
; CHECK-GI-NEXT: fmov x10, d1
261-
; CHECK-GI-NEXT: mov x8, v1.d[1]
262-
; CHECK-GI-NEXT: mul x10, x10, x11
263-
; CHECK-GI-NEXT: mul x8, x8, x9
264-
; CHECK-GI-NEXT: fmov d0, x10
265-
; CHECK-GI-NEXT: mov v0.d[1], x8
255+
; CHECK-GI-NEXT: smull v0.2d, v1.2s, v0.2s
266256
; CHECK-GI-NEXT: ret
267257
%load.A = load <2 x i16>, ptr %A
268258
%load.B = load <2 x i32>, ptr %B

0 commit comments

Comments
 (0)