24 lines · plain
1; RUN: llc -mtriple=hexagon < %s | FileCheck %s2; This testcase crashed, because we propagated a reg:sub into a tied use.3; The two-address pass rewrote it in a way that generated incorrect code.4; CHECK: r{{[0-9]+}} += lsr(r{{[0-9]+}},#16)5 6target triple = "hexagon"7 8define i64 @fred(i64 %x) local_unnamed_addr #0 {9entry:10 %t.sroa.0.0.extract.trunc = trunc i64 %x to i3211 %t4.sroa.4.0.extract.shift = lshr i64 %x, 1612 %add11 = add i32 0, %t.sroa.0.0.extract.trunc13 %t14.sroa.3.0.extract.trunc = trunc i64 %t4.sroa.4.0.extract.shift to i3214 %t14.sroa.4.0.extract.shift = lshr i64 %x, 2415 %add21 = add i32 %add11, %t14.sroa.3.0.extract.trunc16 %t24.sroa.3.0.extract.trunc = trunc i64 %t14.sroa.4.0.extract.shift to i3217 %add31 = add i32 %add21, %t24.sroa.3.0.extract.trunc18 %conv32.mask = and i32 %add31, 25519 %conv33 = zext i32 %conv32.mask to i6420 ret i64 %conv3321}22 23attributes #0 = { norecurse nounwind readnone }24