1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 2; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu | FileCheck %s 3 4; This used to crash due to Live Variable analysis removing the redundant eax 5; and edx clobbers, but not removing the inline asm flag operands that proceed 6; them. 7 8@test_mem = dso_local global [16 x i8] c"UUUUUUUUUUUUUUUU", align 16 9 10; Function Attrs: nounwind uwtable 11define dso_local void @foo() local_unnamed_addr { 12; CHECK-LABEL: foo: 13; CHECK: # %bb.0: # %entry 14; CHECK-NEXT: #APP 15; CHECK: clc 16; CHECK-NEXT: cmpxchg8b {{.*}}(%rip) 17; CHECK-NEXT: cmpxchg16b {{.*}}(%rip) 18; CHECK-NEXT: clc 19; CHECK: #NO_APP 20; CHECK-NEXT: retq 21entry: 22 tail call void asm sideeffect inteldialect "clc\0A\09cmpxchg8b $0\0A\09cmpxchg16b $1\0A\09clc", "=*m,=*m,~{eax},~{edx},~{flags},~{rax},~{rdx},~{dirflag},~{fpsr},~{flags}"([16 x i8]* nonnull @test_mem, [16 x i8]* nonnull @test_mem) #1 23 ret void 24} 25