<div dir="ltr"><div><div><div><div>We're getting this error from one of the LLVM testcases in 3.9 (also had it in 3.6) for our target:<br><br>LLVM ERROR: Cannot select: t36: i64,glue = adde t8, t4, t35:1<br>  t8: i64,ch = CopyFromReg t0, Register:i64 %vreg3<br>    t7: i64 = Register %vreg3<br>  t4: i64,ch = CopyFromReg t0, Register:i64 %vreg1<br>    t3: i64 = Register %vreg1<br>  t35: i64,glue = addc t6, t2<br>    t6: i64,ch = CopyFromReg t0, Register:i64 %vreg2<br>      t5: i64 = Register %vreg2<br>    t2: i64,ch = CopyFromReg t0, Register:i64 %vreg0<br>      t1: i64 = Register %vreg0<br>In function: test_add<br><br><br></div>The testcase is test/CodeGen/Generic/i128-addsub.ll:<br>define void @test_add(i64 %AL, i64 %AH, i64 %BL, i64 %BH, i64* %RL, i64* %RH) {<br>entry:<br>  %tmp1 = zext i64 %AL to i128    ; <i128> [#uses=1]<br>  %tmp23 = zext i64 %AH to i128   ; <i128> [#uses=1]<br>  %tmp4 = shl i128 %tmp23, 64   ; <i128> [#uses=1]<br>  %tmp5 = or i128 %tmp4, %tmp1    ; <i128> [#uses=1]<br>  %tmp67 = zext i64 %BL to i128   ; <i128> [#uses=1]<br>  %tmp89 = zext i64 %BH to i128   ; <i128> [#uses=1]<br>  %tmp11 = shl i128 %tmp89, 64    ; <i128> [#uses=1]<br>  %tmp12 = or i128 %tmp11, %tmp67   ; <i128> [#uses=1]<br>  %tmp15 = add i128 %tmp12, %tmp5   ; <i128> [#uses=2]<br>  %tmp1617 = trunc i128 %tmp15 to i64   ; <i64> [#uses=1]<br>  store i64 %tmp1617, i64* %RL<br>  %tmp21 = lshr i128 %tmp15, 64   ; <i128> [#uses=1]<br>  %tmp2122 = trunc i128 %tmp21 to i64   ; <i64> [#uses=1]<br>  store i64 %tmp2122, i64* %RH<br>  ret void<br>}<br><br><br></div>I've added the following to our Target's TargetISelLowering constructor:<br>  setOperationAction(ISD::ADDE,               MVT::i32, Expand);<br>  setOperationAction(ISD::ADDE,               MVT::i64, Expand);<br>  setOperationAction(ISD::ADDE,               MVT::i16, Expand);<br>  setOperationAction(ISD::ADDE,               MVT::i8, Expand);<br>  setOperationAction(ISD::ADDE,               MVT::f32, Expand);<br>  setOperationAction(ISD::ADDE,               MVT::f64, Expand);<br><br></div>... but it still gives the same error. I'm not sure how the adde node si getting in there - any ideas?<br><br></div>Phil<br><div><div><br><br><br></div></div></div>