66 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc -mcpu=neoverse-n1 < %s | FileCheck %s3target triple = "aarch64-linux-unknown"4 5define void @add_i256(i64 %x0, i64 %x1, i64 %x2, i64 %x3, i64 %y1, i64 %y2, i64 %y3, ptr %store_addr_ptr) {6; CHECK-LABEL: add_i256:7; CHECK: // %bb.0: // %entry8; CHECK-NEXT: adds x8, x0, #19; CHECK-NEXT: adcs x9, x1, x410; CHECK-NEXT: stp x8, x9, [x7]11; CHECK-NEXT: adcs x8, x2, x512; CHECK-NEXT: adc x9, x3, x613; CHECK-NEXT: stp x8, x9, [x7, #16]14; CHECK-NEXT: ret15entry:16 ; Build x_256 = x0 | x1 << 64 | x2 << 128 | x3 << 19217 %temp = zext i64 %x0 to i25618 %temp57 = zext i64 %x1 to i25619 %temp58 = zext i64 %x2 to i25620 %temp59 = zext i64 %x3 to i25621 %temp_shifted = shl i256 %temp, 022 %temp_shifted60 = shl i256 %temp57, 6423 %temp_shifted61 = shl i256 %temp58, 12824 %temp_shifted62 = shl i256 %temp59, 19225 %x = or i256 %temp_shifted, %temp_shifted6026 %x63 = or i256 %x, %temp_shifted6127 %x_big = or i256 %x63, %temp_shifted6228 29 ; Build y_256 = 1 | y1 << 64 | y2 << 128 | y3 << 19230 %temp65 = zext i64 %y1 to i25631 %temp66 = zext i64 %y2 to i25632 %temp67 = zext i64 %y3 to i25633 %temp_shifted68 = shl i256 %temp65, 6434 %temp_shifted69 = shl i256 %temp66, 12835 %temp_shifted70 = shl i256 %temp67, 19236 %y = or i256 1, %temp_shifted6837 %y71 = or i256 %y, %temp_shifted6938 %y_big = or i256 %y71, %temp_shifted7039 40 ; z_256 = x_256 + y_25641 %z_256 = add i256 %x_big, %y_big42 43 ; split z_256 into 4 64-bit registers44 %split_64bits = lshr i256 %z_256, 045 %z0 = trunc i256 %split_64bits to i6446 %split_64bits74 = lshr i256 %z_256, 6447 %z1 = trunc i256 %split_64bits74 to i6448 %split_64bits76 = lshr i256 %z_256, 12849 %z2 = trunc i256 %split_64bits76 to i6450 %split_64bits78 = lshr i256 %z_256, 19251 %z3 = trunc i256 %split_64bits78 to i6452 53 %outptr0 = bitcast ptr %store_addr_ptr to ptr54 store i64 %z0, ptr %outptr0, align 455 %gep = getelementptr i8, ptr %store_addr_ptr, i64 856 %outptr1 = bitcast ptr %gep to ptr57 store i64 %z1, ptr %outptr1, align 458 %store_addr_ofs = getelementptr i8, ptr %store_addr_ptr, i64 1659 %outptr081 = bitcast ptr %store_addr_ofs to ptr60 store i64 %z2, ptr %outptr081, align 461 %gep82 = getelementptr i8, ptr %store_addr_ofs, i64 862 %outptr183 = bitcast ptr %gep82 to ptr63 store i64 %z3, ptr %outptr183, align 464 ret void65}66