Skip to content

Commit

Permalink
[SOL] Fix broken tests unrelated to Solana/BPF backend
Browse files Browse the repository at this point in the history
- duplicate checks in stack-clash-medium removed
- align attribute is not supported by cmpxchg yet
  • Loading branch information
dmakarov committed May 17, 2021
1 parent 393dae0 commit d832fd2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 29 deletions.
30 changes: 3 additions & 27 deletions llvm/test/CodeGen/X86/stack-clash-medium.ll
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,6 @@
; RUN: llc -mtriple=i686-linux-android < %s | FileCheck -check-prefix=CHECK-X86-32 %s

define i32 @foo() local_unnamed_addr #0 {
; CHECK-X86-64-LABEL: foo:
; CHECK-X86-64: # %bb.0:
; CHECK-X86-64-NEXT: subq $4096, %rsp # imm = 0x1000
; CHECK-X86-64-NEXT: .cfi_adjust_cfa_offset 4096
; CHECK-X86-64-NEXT: movq $0, (%rsp)
; CHECK-X86-64-NEXT: subq $3784, %rsp # imm = 0xEC8
; CHECK-X86-64-NEXT: .cfi_def_cfa_offset 7888
; CHECK-X86-64-NEXT: movl $1, 672(%rsp)
; CHECK-X86-64-NEXT: movl -128(%rsp), %eax
; CHECK-X86-64-NEXT: addq $7880, %rsp # imm = 0x1EC8
; CHECK-X86-64-NEXT: .cfi_def_cfa_offset 8
; CHECK-X86-64-NEXT: retq
;
; CHECK-X86-32-LABEL: foo:
; CHECK-X86-32: # %bb.0:
; CHECK-X86-32-NEXT: subl $4096, %esp # imm = 0x1000
; CHECK-X86-32-NEXT: .cfi_adjust_cfa_offset 4096
; CHECK-X86-32-NEXT: movl $0, (%esp)
; CHECK-X86-32-NEXT: subl $3916, %esp # imm = 0xF4C
; CHECK-X86-32-NEXT: .cfi_def_cfa_offset 8016
; CHECK-X86-32-NEXT: movl $1, 800(%esp)
; CHECK-X86-32-NEXT: movl (%esp), %eax
; CHECK-X86-32-NEXT: addl $8012, %esp # imm = 0x1F4C
; CHECK-X86-32-NEXT: .cfi_def_cfa_offset 4
; CHECK-X86-32-NEXT: retl
%a = alloca i32, i64 2000, align 16
%b = getelementptr inbounds i32, i32* %a, i64 200
store volatile i32 1, i32* %b
Expand All @@ -39,6 +14,7 @@ attributes #0 = {"probe-stack"="inline-asm"}
; CHECK-X86-64-LABEL: foo:
; CHECK-X86-64: # %bb.0:
; CHECK-X86-64-NEXT: subq $4096, %rsp # imm = 0x1000
; CHECK-X86-64-NEXT: .cfi_adjust_cfa_offset 4096
; CHECK-X86-64-NEXT: movq $0, (%rsp)
; CHECK-X86-64-NEXT: subq $3784, %rsp # imm = 0xEC8
; CHECK-X86-64-NEXT: .cfi_def_cfa_offset 7888
Expand All @@ -48,10 +24,10 @@ attributes #0 = {"probe-stack"="inline-asm"}
; CHECK-X86-64-NEXT: .cfi_def_cfa_offset 8
; CHECK-X86-64-NEXT: retq


; CHECK-X86-32-LABEL: foo:
; CHECK-X86-32-LABEL: foo:{{.*}}
; CHECK-X86-32: # %bb.0:
; CHECK-X86-32-NEXT: subl $4096, %esp # imm = 0x1000
; CHECK-X86-32-NEXT: .cfi_adjust_cfa_offset 4096
; CHECK-X86-32-NEXT: movl $0, (%esp)
; CHECK-X86-32-NEXT: subl $3916, %esp # imm = 0xF4C
; CHECK-X86-32-NEXT: .cfi_def_cfa_offset 8016
Expand Down
4 changes: 2 additions & 2 deletions llvm/test/Transforms/LICM/promote-atomic.ll
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ define void @test(%class.LiveThread* %live_thread) {
; CHECK-NEXT: br label [[LOOP:%.*]]
; CHECK: loop:
; CHECK-NEXT: store %class.LiveThread* undef, %class.LiveThread** [[NEXT_UNPROCESSED_]], align 8
; CHECK-NEXT: [[XCHG:%.*]] = cmpxchg weak i64* @globallive, i64 undef, i64 undef release monotonic, align 8
; CHECK-NEXT: [[XCHG:%.*]] = cmpxchg weak i64* @globallive, i64 undef, i64 undef release monotonic
; CHECK-NEXT: [[DONE:%.*]] = extractvalue { i64, i1 } [[XCHG]], 1
; CHECK-NEXT: br i1 [[DONE]], label [[EXIT:%.*]], label [[LOOP]]
; CHECK: exit:
Expand All @@ -24,7 +24,7 @@ define void @test(%class.LiveThread* %live_thread) {

loop:
store %class.LiveThread* undef, %class.LiveThread** %next_unprocessed_, align 8
%xchg = cmpxchg weak i64* @globallive, i64 undef, i64 undef release monotonic, align 8
%xchg = cmpxchg weak i64* @globallive, i64 undef, i64 undef release monotonic
%done = extractvalue { i64, i1 } %xchg, 1
br i1 %done, label %exit, label %loop

Expand Down

0 comments on commit d832fd2

Please sign in to comment.