Make DataLayout Non-Optional in the Module
[oota-llvm.git] / test / Transforms / InstCombine / overflow-mul.ll
index 6d8d40bcac3e656d54ee196e3180d7990f2af5df..bc0504b0a96d132b8217bbddaa78944d9d8f1335 100644 (file)
@@ -174,6 +174,17 @@ define <4 x i32> @pr20113(<4 x i16> %a, <4 x i16> %b) {
   ret <4 x i32> %vcgez.i
 }
 
+
+; The last test needs this weird datalayout.
+target datalayout = "i32:8:8"
+; Without it, InstCombine will align the pointed on 4 Bytes
+; The KnownBitsZero that result from the alignment allows to
+; turn:
+;    and i32 %mul, 255
+; to:
+;    and i32 %mul, 252
+; The mask is no longer in the form 2^n-1  and this prevents the transformation.
+
 @pr21445_data = external global i32
 define i1 @pr21445(i8 %a) {
 ; CHECK-LABEL: @pr21445(