1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00
llvm-mirror/test/CodeGen/X86/xor-select-i1-combine.ll
Francis Visoiu Mistrih 30264d4391 [CodeGen] Unify MBB reference format in both MIR and debug output
As part of the unification of the debug format and the MIR format, print
MBB references as '%bb.5'.

The MIR printer prints the IR name of a MBB only for block definitions.

* find . \( -name "*.mir" -o -name "*.cpp" -o -name "*.h" -o -name "*.ll" \) -type f -print0 | xargs -0 sed -i '' -E 's/BB#" << ([a-zA-Z0-9_]+)->getNumber\(\)/" << printMBBReference(*\1)/g'
* find . \( -name "*.mir" -o -name "*.cpp" -o -name "*.h" -o -name "*.ll" \) -type f -print0 | xargs -0 sed -i '' -E 's/BB#" << ([a-zA-Z0-9_]+)\.getNumber\(\)/" << printMBBReference(\1)/g'
* find . \( -name "*.txt" -o -name "*.s" -o -name "*.mir" -o -name "*.cpp" -o -name "*.h" -o -name "*.ll" \) -type f -print0 | xargs -0 sed -i '' -E 's/BB#([0-9]+)/%bb.\1/g'
* grep -nr 'BB#' and fix

Differential Revision: https://reviews.llvm.org/D40422

llvm-svn: 319665
2017-12-04 17:18:51 +00:00

41 lines
1.1 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
;RUN: llc < %s -O2 -mattr=+avx512f -mtriple=x86_64-unknown | FileCheck %s
@n = common global i32 0, align 4
@m = common global i32 0, align 4
define i32 @main(i8 %small) {
; CHECK-LABEL: main:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: testb $1, %dil
; CHECK-NEXT: movl $m, %eax
; CHECK-NEXT: movl $n, %ecx
; CHECK-NEXT: cmoveq %rax, %rcx
; CHECK-NEXT: movl (%rcx), %eax
; CHECK-NEXT: retq
entry:
%0 = and i8 %small, 1
%cmp = icmp eq i8 %0, 0
%m.n = select i1 %cmp, i32* @m, i32* @n
%retval = load volatile i32, i32* %m.n, align 4
ret i32 %retval
}
define i32 @main2(i8 %small) {
; CHECK-LABEL: main2:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: movl $m, %eax
; CHECK-NEXT: movl $n, %ecx
; CHECK-NEXT: testb $1, %dil
; CHECK-NEXT: cmovneq %rax, %rcx
; CHECK-NEXT: movl (%rcx), %eax
; CHECK-NEXT: retq
entry:
%0 = and i8 %small, 1
%cmp = icmp eq i8 %0, 1
%m.n = select i1 %cmp, i32* @m, i32* @n
%retval = load volatile i32, i32* %m.n, align 4
ret i32 %retval
}