blob: 8344249807610201018bb6ec0c5ffd3f1269e097 [file] [log] [blame]
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4
; RUN: llc -mtriple=x86_64-unknown-linux-gnu -O0 < %s | FileCheck %s
; A bug in X86DAGToDAGISel::matchAddressRecursively create a zext SDValue which
; is quickly replaced by other SDValue but already pushed into vector for later
; calling for SelectionDAGISel::Select_INLINEASM getNode builder, see issue
; 82431 for more infomation.
define void @PR82431(i8 %call, ptr %b) {
; CHECK-LABEL: PR82431:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: movb %dil, %al
; CHECK-NEXT: addb $1, %al
; CHECK-NEXT: movzbl %al, %eax
; CHECK-NEXT: # kill: def $rax killed $eax
; CHECK-NEXT: shlq $3, %rax
; CHECK-NEXT: addq %rax, %rsi
; CHECK-NEXT: #APP
; CHECK-NEXT: #NO_APP
; CHECK-NEXT: retq
entry:
%narrow = add nuw i8 %call, 1
%idxprom = zext i8 %narrow to i64
%arrayidx = getelementptr [1 x i64], ptr %b, i64 0, i64 %idxprom
tail call void asm "", "=*m,*m,~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %arrayidx, ptr elementtype(i64) %arrayidx)
ret void
}