Skip to content

Commit 1de03a8

Browse files
committed
Autogenerate test.
1 parent a95ff19 commit 1de03a8

File tree

2 files changed

+13
-18
lines changed

2 files changed

+13
-18
lines changed

llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -456,10 +456,10 @@ SDValue DAGTypeLegalizer::ScalarizeVecRes_INSERT_VECTOR_ELT(SDNode *N) {
456456

457457
SDValue DAGTypeLegalizer::ScalarizeVecRes_ATOMIC_LOAD(AtomicSDNode *N) {
458458

459-
SDValue Result = DAG.getAtomic(ISD::ATOMIC_LOAD, SDLoc(N),
460-
N->getMemoryVT().getVectorElementType(),
461-
N->getValueType(0).getVectorElementType(),
462-
N->getChain(), N->getBasePtr(), N->getMemOperand());
459+
SDValue Result = DAG.getAtomic(
460+
ISD::ATOMIC_LOAD, SDLoc(N), N->getMemoryVT().getVectorElementType(),
461+
N->getValueType(0).getVectorElementType(), N->getChain(), N->getBasePtr(),
462+
N->getMemOperand());
463463

464464
// Legalize the chain result - switch anything that used the old chain to
465465
// use the new one.
+9-14
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
1-
; RUN: llc %s --mtriple=x86_64 -print-after=unpack-mi-bundles -disable-verify 2>&1 | FileCheck %s
1+
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
2+
; RUN: llc %s --mtriple=x86_64 | FileCheck %s
23

3-
define i32 @atomic_scalar() {
4-
; CHECK: # *** IR Dump After Unpack machine instruction bundles (unpack-mi-bundles) ***:
5-
; CHECK-NEXT: # Machine code for function atomic_scalar: NoPHIs, TracksLiveness, NoVRegs, TiedOpsRewritten, TracksDebugUserValues
6-
; CHECK-NEXT: Frame Objects:
7-
; CHECK-NEXT: fi#0: size=4, align=4, at location [SP-4]
8-
; CHECK: bb.0 (%ir-block.0):
9-
; CHECK-NEXT: renamable $eax = MOV32rm $rsp, 1, $noreg, -4, $noreg :: (dereferenceable load acquire (s32) from %ir.1)
10-
; CHECK-NEXT: RET64 $eax
11-
; CHECK: # End machine code for function atomic_scalar.
12-
%1 = alloca <1 x i32>
13-
%2 = load atomic <1 x i32>, ptr %1 acquire, align 4
14-
%3 = extractelement <1 x i32> %2, i32 0
15-
ret i32 %3
4+
define <1 x i32> @atomic_scalar_i32(ptr %x) {
5+
; CHECK-LABEL: atomic_scalar_i32:
6+
; CHECK: # %bb.0:
7+
; CHECK-NEXT: movl (%rdi), %eax
8+
; CHECK-NEXT: retq
9+
%ret = load atomic <1 x i32>, ptr %x acquire, align 4
10+
ret <1 x i32> %ret
1611
}

0 commit comments

Comments
 (0)