1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 2 ; RUN: llc < %s -mtriple=x86_64-unknown -mattr=+bmi2 | FileCheck %s 3 ; RUN: llc < %s -mtriple=x86_64-unknown -mcpu=core-avx2 | FileCheck %s 4 5 define i128 @f1(i64 %a, i64 %b) { 6 ; CHECK-LABEL: f1: 7 ; CHECK: # %bb.0: 8 ; CHECK-NEXT: movq %rdi, %rdx 9 ; CHECK-NEXT: mulxq %rsi, %rax, %rdx 10 ; CHECK-NEXT: retq 11 %x = zext i64 %a to i128 12 %y = zext i64 %b to i128 13 %r = mul i128 %x, %y 14 ret i128 %r 15 } 16 17 define i128 @f2(i64 %a, i64* %p) { 18 ; CHECK-LABEL: f2: 19 ; CHECK: # %bb.0: 20 ; CHECK-NEXT: movq %rdi, %rdx 21 ; CHECK-NEXT: mulxq (%rsi), %rax, %rdx 22 ; CHECK-NEXT: retq 23 %b = load i64, i64* %p 24 %x = zext i64 %a to i128 25 %y = zext i64 %b to i128 26 %r = mul i128 %x, %y 27 ret i128 %r 28 } 29