From 866b9965faeb32b0207daaab174c00d42e3fa2d8 Mon Sep 17 00:00:00 2001 From: Valentina Sona Date: Wed, 19 Apr 2023 22:32:58 +0200 Subject: [PATCH] Add test for the boolean not TANP transformation --- .../TwosComplementArithmeticNormalization.ll | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/unit/llvm-lit-tests/TwosComplementArithmeticNormalization.ll b/tests/unit/llvm-lit-tests/TwosComplementArithmeticNormalization.ll index d34c168ca..ce27295ef 100644 --- a/tests/unit/llvm-lit-tests/TwosComplementArithmeticNormalization.ll +++ b/tests/unit/llvm-lit-tests/TwosComplementArithmeticNormalization.ll @@ -279,4 +279,16 @@ define i1 @neg_neg(i16 %0) !revng.tags !0 { ret i1 %3 } +define i1 @twoscomplement_norm_boolean_not(i8 %0) !revng.tags !0 { + ; CHECK: %2 = call i1 @boolean_not(i8 %0) + ; CHECK-NEXT: br i1 %2, label %If, label %Else + + %2 = icmp eq i8 %0, 0 + br i1 %2, label %If, label %Else + If: + ret i1 0 + Else: + ret i1 1 +} + !0 = !{!"Isolated"}