diff options
| author | Elena Demikhovsky <elena.demikhovsky@intel.com> | 2016-06-27 18:07:16 +0000 |
|---|---|---|
| committer | Elena Demikhovsky <elena.demikhovsky@intel.com> | 2016-06-27 18:07:16 +0000 |
| commit | ad3929cc64a0104b186901a2192d1ce5acfd59c9 (patch) | |
| tree | 5fcb48c5e6b0ef6d50ba630ac08779f65c496171 /llvm/test | |
| parent | 8065c5187508bca7de4711b627891f5ef5968e48 (diff) | |
| download | bcm5719-llvm-ad3929cc64a0104b186901a2192d1ce5acfd59c9.tar.gz bcm5719-llvm-ad3929cc64a0104b186901a2192d1ce5acfd59c9.zip | |
X86 Lowering - Fixed a crash in ICMP scalar instruction
Fixed a bug in EmitTest() function in combining shl + icmp.
https://llvm.org/bugs/show_bug.cgi?id=28119
llvm-svn: 273899
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/CodeGen/X86/2016-06-28-ICmpCrash.ll | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/2016-06-28-ICmpCrash.ll b/llvm/test/CodeGen/X86/2016-06-28-ICmpCrash.ll new file mode 100644 index 00000000000..f5a8d96fd47 --- /dev/null +++ b/llvm/test/CodeGen/X86/2016-06-28-ICmpCrash.ll @@ -0,0 +1,31 @@ +;RUN: llc < %s -mcpu=core-avx2 + +target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-unknown-linux-gnu" + +%struct.struct_1 = type { i24 } + +@a = global i8 0, align 1 +@b = global i8 0, align 1 +@d = global i8 0, align 1 +@e = global i8 0, align 1 +@c = global %struct.struct_1 zeroinitializer, align 4 + +; Function Attrs: norecurse nounwind uwtable +define void @_Z3fn1v() #0 { + %bf.load = load i32, i32* bitcast (%struct.struct_1* @c to i32*), align 4 + %bf.shl = shl i32 %bf.load, 8 + %bf.ashr = ashr exact i32 %bf.shl, 8 + %tobool4 = icmp ne i32 %bf.ashr, 0 + %conv = zext i1 %tobool4 to i32 + %x1 = load i8, i8* @e, align 1 + %conv6 = zext i8 %x1 to i32 + %add = add nuw nsw i32 %conv, %conv6 + %tobool7 = icmp ne i32 %add, 0 + %frombool = zext i1 %tobool7 to i8 + store i8 %frombool, i8* @b, align 1 + %tobool14 = icmp ne i32 %bf.shl, 0 + %frombool15 = zext i1 %tobool14 to i8 + store i8 %frombool15, i8* @d, align 1 + ret void +}
\ No newline at end of file |

