summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/X86/pr12360.ll
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2012-03-31 18:14:00 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2012-03-31 18:14:00 +0000
commit95d594cac3737ae1594a391276942a443cac426b (patch)
tree169dda5061241d6c695ce797a8d8f84887d5b43f /test/CodeGen/X86/pr12360.ll
parent5b00ceaeeabff8c25abb09926343c3fcb06053d8 (diff)
downloadexternal_llvm-95d594cac3737ae1594a391276942a443cac426b.zip
external_llvm-95d594cac3737ae1594a391276942a443cac426b.tar.gz
external_llvm-95d594cac3737ae1594a391276942a443cac426b.tar.bz2
Teach CodeGen's version of computeMaskedBits to understand the range metadata.
This is the CodeGen equivalent of r153747. I tested that there is not noticeable performance difference with any combination of -O0/-O2 /-g when compiling gcc as a single compilation unit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153817 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/pr12360.ll')
-rw-r--r--test/CodeGen/X86/pr12360.ll14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/CodeGen/X86/pr12360.ll b/test/CodeGen/X86/pr12360.ll
new file mode 100644
index 0000000..c0af432
--- /dev/null
+++ b/test/CodeGen/X86/pr12360.ll
@@ -0,0 +1,14 @@
+; RUN: llc < %s -march=x86-64 | FileCheck %s
+
+define zeroext i1 @f1(i8* %x) {
+entry:
+ %0 = load i8* %x, align 1, !range !0
+ %tobool = trunc i8 %0 to i1
+ ret i1 %tobool
+}
+
+; CHECK: f1:
+; CHECK: movb (%rdi), %al
+; CHECK-NEXT: ret
+
+!0 = metadata !{i8 0, i8 2}