diff options
author | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2017-12-07 10:40:31 +0000 |
---|---|---|
committer | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2017-12-07 10:40:31 +0000 |
commit | a8a83d150f489733353b3bff0891248f59a0794c (patch) | |
tree | aa7c9a64cb3f5d7982b775f2e082c07ebfe74b49 /llvm/test/CodeGen/X86/select_const.ll | |
parent | 62ef18562b5494567c601be41761cf8449960ad4 (diff) | |
download | bcm5719-llvm-a8a83d150f489733353b3bff0891248f59a0794c.tar.gz bcm5719-llvm-a8a83d150f489733353b3bff0891248f59a0794c.zip |
[CodeGen] Use MachineOperand::print in the MIRPrinter for MO_Register.
Work towards the unification of MIR and debug output by refactoring the
interfaces.
For MachineOperand::print, keep a simple version that can be easily called
from `dump()`, and a more complex one which will be called from both the
MIRPrinter and MachineInstr::print.
Add extra checks inside MachineOperand for detached operands (operands
with getParent() == nullptr).
https://reviews.llvm.org/D40836
* find . \( -name "*.mir" -o -name "*.cpp" -o -name "*.h" -o -name "*.ll" -o -name "*.s" \) -type f -print0 | xargs -0 sed -i '' -E 's/kill: ([^ ]+) ([^ ]+)<def> ([^ ]+)/kill: \1 def \2 \3/g'
* find . \( -name "*.mir" -o -name "*.cpp" -o -name "*.h" -o -name "*.ll" -o -name "*.s" \) -type f -print0 | xargs -0 sed -i '' -E 's/kill: ([^ ]+) ([^ ]+) ([^ ]+)<def>/kill: \1 \2 def \3/g'
* find . \( -name "*.mir" -o -name "*.cpp" -o -name "*.h" -o -name "*.ll" -o -name "*.s" \) -type f -print0 | xargs -0 sed -i '' -E 's/kill: def ([^ ]+) ([^ ]+) ([^ ]+)<def>/kill: def \1 \2 def \3/g'
* find . \( -name "*.mir" -o -name "*.cpp" -o -name "*.h" -o -name "*.ll" -o -name "*.s" \) -type f -print0 | xargs -0 sed -i '' -E 's/<def>//g'
* find . \( -name "*.mir" -o -name "*.cpp" -o -name "*.h" -o -name "*.ll" -o -name "*.s" \) -type f -print0 | xargs -0 sed -i '' -E 's/([^ ]+)<kill>/killed \1/g'
* find . \( -name "*.mir" -o -name "*.cpp" -o -name "*.h" -o -name "*.ll" -o -name "*.s" \) -type f -print0 | xargs -0 sed -i '' -E 's/([^ ]+)<imp-use,kill>/implicit killed \1/g'
* find . \( -name "*.mir" -o -name "*.cpp" -o -name "*.h" -o -name "*.ll" -o -name "*.s" \) -type f -print0 | xargs -0 sed -i '' -E 's/([^ ]+)<dead>/dead \1/g'
* find . \( -name "*.mir" -o -name "*.cpp" -o -name "*.h" -o -name "*.ll" -o -name "*.s" \) -type f -print0 | xargs -0 sed -i '' -E 's/([^ ]+)<def[ ]*,[ ]*dead>/dead \1/g'
* find . \( -name "*.mir" -o -name "*.cpp" -o -name "*.h" -o -name "*.ll" -o -name "*.s" \) -type f -print0 | xargs -0 sed -i '' -E 's/([^ ]+)<imp-def[ ]*,[ ]*dead>/implicit-def dead \1/g'
* find . \( -name "*.mir" -o -name "*.cpp" -o -name "*.h" -o -name "*.ll" -o -name "*.s" \) -type f -print0 | xargs -0 sed -i '' -E 's/([^ ]+)<imp-def>/implicit-def \1/g'
* find . \( -name "*.mir" -o -name "*.cpp" -o -name "*.h" -o -name "*.ll" -o -name "*.s" \) -type f -print0 | xargs -0 sed -i '' -E 's/([^ ]+)<imp-use>/implicit \1/g'
* find . \( -name "*.mir" -o -name "*.cpp" -o -name "*.h" -o -name "*.ll" -o -name "*.s" \) -type f -print0 | xargs -0 sed -i '' -E 's/([^ ]+)<internal>/internal \1/g'
* find . \( -name "*.mir" -o -name "*.cpp" -o -name "*.h" -o -name "*.ll" -o -name "*.s" \) -type f -print0 | xargs -0 sed -i '' -E 's/([^ ]+)<undef>/undef \1/g'
llvm-svn: 320022
Diffstat (limited to 'llvm/test/CodeGen/X86/select_const.ll')
-rw-r--r-- | llvm/test/CodeGen/X86/select_const.ll | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/test/CodeGen/X86/select_const.ll b/llvm/test/CodeGen/X86/select_const.ll index ee74986ab5d..d78f94db71a 100644 --- a/llvm/test/CodeGen/X86/select_const.ll +++ b/llvm/test/CodeGen/X86/select_const.ll @@ -74,7 +74,7 @@ define i32 @select_1_or_0_signext(i1 signext %cond) { define i32 @select_0_or_neg1(i1 %cond) { ; CHECK-LABEL: select_0_or_neg1: ; CHECK: # %bb.0: -; CHECK-NEXT: # kill: %edi<def> %edi<kill> %rdi<def> +; CHECK-NEXT: # kill: def %edi killed %edi def %rdi ; CHECK-NEXT: andl $1, %edi ; CHECK-NEXT: leal -1(%rdi), %eax ; CHECK-NEXT: retq @@ -85,7 +85,7 @@ define i32 @select_0_or_neg1(i1 %cond) { define i32 @select_0_or_neg1_zeroext(i1 zeroext %cond) { ; CHECK-LABEL: select_0_or_neg1_zeroext: ; CHECK: # %bb.0: -; CHECK-NEXT: # kill: %edi<def> %edi<kill> %rdi<def> +; CHECK-NEXT: # kill: def %edi killed %edi def %rdi ; CHECK-NEXT: leal -1(%rdi), %eax ; CHECK-NEXT: retq %sel = select i1 %cond, i32 0, i32 -1 @@ -139,7 +139,7 @@ define i32 @select_neg1_or_0_signext(i1 signext %cond) { define i32 @select_Cplus1_C(i1 %cond) { ; CHECK-LABEL: select_Cplus1_C: ; CHECK: # %bb.0: -; CHECK-NEXT: # kill: %edi<def> %edi<kill> %rdi<def> +; CHECK-NEXT: # kill: def %edi killed %edi def %rdi ; CHECK-NEXT: andl $1, %edi ; CHECK-NEXT: leal 41(%rdi), %eax ; CHECK-NEXT: retq @@ -150,7 +150,7 @@ define i32 @select_Cplus1_C(i1 %cond) { define i32 @select_Cplus1_C_zeroext(i1 zeroext %cond) { ; CHECK-LABEL: select_Cplus1_C_zeroext: ; CHECK: # %bb.0: -; CHECK-NEXT: # kill: %edi<def> %edi<kill> %rdi<def> +; CHECK-NEXT: # kill: def %edi killed %edi def %rdi ; CHECK-NEXT: leal 41(%rdi), %eax ; CHECK-NEXT: retq %sel = select i1 %cond, i32 42, i32 41 @@ -287,7 +287,7 @@ define i16 @sel_neg1_1(i32 %x) { ; CHECK-NEXT: cmpl $43, %edi ; CHECK-NEXT: setl %al ; CHECK-NEXT: leal -1(,%rax,4), %eax -; CHECK-NEXT: # kill: %ax<def> %ax<kill> %eax<kill> +; CHECK-NEXT: # kill: def %ax killed %ax killed %eax ; CHECK-NEXT: retq %cmp = icmp sgt i32 %x, 42 %sel = select i1 %cmp, i16 -1, i16 3 @@ -344,7 +344,7 @@ define i16 @select_pow2_diff_invert(i1 zeroext %cond) { ; CHECK-NEXT: movzbl %dil, %eax ; CHECK-NEXT: shll $6, %eax ; CHECK-NEXT: orl $7, %eax -; CHECK-NEXT: # kill: %ax<def> %ax<kill> %eax<kill> +; CHECK-NEXT: # kill: def %ax killed %ax killed %eax ; CHECK-NEXT: retq %sel = select i1 %cond, i16 7, i16 71 ret i16 %sel |