diff options
| author | Mingming Liu <mingmingl@google.com> | 2025-09-10 15:25:31 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-10 15:25:31 -0700 |
| commit | 1417dafa1db9cb1b2b09438aa9f53ea5ab6e36e2 (patch) | |
| tree | 57f4b1f313c8cf74eed8819870f39c36ea263c68 /llvm/test/CodeGen/X86/apx | |
| parent | 898b813bc8a6d0276bf0f4769f5f2f64b34e632d (diff) | |
| parent | b8cefcb601ddaa18482555c4ff363c01a270c2fe (diff) | |
Merge branch 'main' into users/mingmingl-llvm/samplefdo-profile-formatusers/mingmingl-llvm/samplefdo-profile-format
Diffstat (limited to 'llvm/test/CodeGen/X86/apx')
| -rw-r--r-- | llvm/test/CodeGen/X86/apx/cf.ll | 18 | ||||
| -rw-r--r-- | llvm/test/CodeGen/X86/apx/push2-pop2-cfi-seh.ll | 8 |
2 files changed, 22 insertions, 4 deletions
diff --git a/llvm/test/CodeGen/X86/apx/cf.ll b/llvm/test/CodeGen/X86/apx/cf.ll index e52ce6ca815b..b2651e91134e 100644 --- a/llvm/test/CodeGen/X86/apx/cf.ll +++ b/llvm/test/CodeGen/X86/apx/cf.ll @@ -229,3 +229,21 @@ entry: call void @llvm.masked.store.v1i32.p0(<1 x i32> zeroinitializer, ptr %p, i32 1, <1 x i1> %1) ret void } + +define i64 @redundant_test(i64 %num, ptr %p1, i64 %in) { +; CHECK-LABEL: redundant_test: +; CHECK: # %bb.0: +; CHECK-NEXT: testl $-32, %edi +; CHECK-NEXT: cfcmoveq (%rsi), %rax +; CHECK-NEXT: {nf} addq %rdx, %rax +; CHECK-NEXT: cmovneq %rdi, %rax +; CHECK-NEXT: retq + %and = and i64 %num, 4294967264 + %cmp = icmp eq i64 %and, 0 + %mask = bitcast i1 %cmp to <1 x i1> + %condload = tail call <1 x i64> @llvm.masked.load.v1i64.p0(ptr %p1, i32 8, <1 x i1> %mask, <1 x i64> poison) + %v = bitcast <1 x i64> %condload to i64 + %add = add i64 %v, %in + %sel = select i1 %cmp, i64 %add, i64 %num + ret i64 %sel +} diff --git a/llvm/test/CodeGen/X86/apx/push2-pop2-cfi-seh.ll b/llvm/test/CodeGen/X86/apx/push2-pop2-cfi-seh.ll index ad24608d338a..d6d4db350910 100644 --- a/llvm/test/CodeGen/X86/apx/push2-pop2-cfi-seh.ll +++ b/llvm/test/CodeGen/X86/apx/push2-pop2-cfi-seh.ll @@ -81,7 +81,7 @@ define i32 @csr6_alloc16(ptr %argv) { ; LIN-NEXT: .cfi_def_cfa_offset 32 ; LIN-NEXT: pop2 %rbp, %r15 ; LIN-NEXT: .cfi_def_cfa_offset 16 -; LIN-NEXT: popq %rcx +; LIN-NEXT: popq %rax ; LIN-NEXT: .cfi_def_cfa_offset 8 ; LIN-NEXT: retq ; @@ -116,7 +116,7 @@ define i32 @csr6_alloc16(ptr %argv) { ; LIN-PPX-NEXT: .cfi_def_cfa_offset 32 ; LIN-PPX-NEXT: pop2p %rbp, %r15 ; LIN-PPX-NEXT: .cfi_def_cfa_offset 16 -; LIN-PPX-NEXT: popq %rcx +; LIN-PPX-NEXT: popq %rax ; LIN-PPX-NEXT: .cfi_def_cfa_offset 8 ; LIN-PPX-NEXT: retq ; @@ -180,7 +180,7 @@ define i32 @csr6_alloc16(ptr %argv) { ; WIN-NEXT: pop2 %rbp, %rbx ; WIN-NEXT: pop2 %r13, %r12 ; WIN-NEXT: pop2 %r15, %r14 -; WIN-NEXT: popq %rcx +; WIN-NEXT: popq %rax ; WIN-NEXT: .seh_endepilogue ; WIN-NEXT: retq ; WIN-NEXT: .seh_endproc @@ -211,7 +211,7 @@ define i32 @csr6_alloc16(ptr %argv) { ; WIN-PPX-NEXT: pop2p %rbp, %rbx ; WIN-PPX-NEXT: pop2p %r13, %r12 ; WIN-PPX-NEXT: pop2p %r15, %r14 -; WIN-PPX-NEXT: popq %rcx +; WIN-PPX-NEXT: popq %rax ; WIN-PPX-NEXT: .seh_endepilogue ; WIN-PPX-NEXT: retq ; WIN-PPX-NEXT: .seh_endproc |
