[llvm] r341424 - [InstCombine] update tests checks; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 4 16:08:23 PDT 2018
Author: spatel
Date: Tue Sep 4 16:08:23 2018
New Revision: 341424
URL: http://llvm.org/viewvc/llvm-project?rev=341424&view=rev
Log:
[InstCombine] update tests checks; NFC
Modified:
llvm/trunk/test/Transforms/InstCombine/demand_shrink_nsw.ll
Modified: llvm/trunk/test/Transforms/InstCombine/demand_shrink_nsw.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/demand_shrink_nsw.ll?rev=341424&r1=341423&r2=341424&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/demand_shrink_nsw.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/demand_shrink_nsw.ll Tue Sep 4 16:08:23 2018
@@ -1,15 +1,25 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt -instcombine -o - -S %s | FileCheck %s
; The constant at %v35 should be shrunk, but this must lead to the nsw flag of
; %v43 getting removed so that %v44 is not illegally optimized away.
-; CHECK-LABEL: @foo
-; CHECK: %v35 = add nuw nsw i32 %v34, 1362915575
-; ...
-; CHECK: add nuw i32 %v42, 1533579450
-; CHECK-NEXT: %v44 = or i32 %v43, -2147483648
-; CHECK-NEXT: %v45 = xor i32 %v44, 749011377
-; CHECK-NEXT: ret i32 %v45
+
define i32 @foo(i32 %arg) {
+; CHECK-LABEL: @foo(
+; CHECK-NEXT: [[V33:%.*]] = and i32 [[ARG:%.*]], 223
+; CHECK-NEXT: [[V34:%.*]] = xor i32 [[V33]], 29
+; CHECK-NEXT: [[V35:%.*]] = add nuw nsw i32 [[V34]], 1362915575
+; CHECK-NEXT: [[V37:%.*]] = or i32 [[V34]], 1874836915
+; CHECK-NEXT: [[V38:%.*]] = and i32 [[V34]], 221
+; CHECK-NEXT: [[V39:%.*]] = xor i32 [[V38]], 1874836915
+; CHECK-NEXT: [[V40:%.*]] = xor i32 [[V37]], [[V39]]
+; CHECK-NEXT: [[V41:%.*]] = shl nuw nsw i32 [[V40]], 1
+; CHECK-NEXT: [[V42:%.*]] = sub nsw i32 [[V35]], [[V41]]
+; CHECK-NEXT: [[V43:%.*]] = add nuw i32 [[V42]], 1533579450
+; CHECK-NEXT: [[V44:%.*]] = or i32 [[V43]], -2147483648
+; CHECK-NEXT: [[V45:%.*]] = xor i32 [[V44]], 749011377
+; CHECK-NEXT: ret i32 [[V45]]
+;
%v33 = and i32 %arg, 223
%v34 = xor i32 %v33, 29
%v35 = add nuw i32 %v34, 3510399223
@@ -24,3 +34,4 @@ define i32 @foo(i32 %arg) {
%v45 = xor i32 %v44, 749011377
ret i32 %v45
}
+
More information about the llvm-commits
mailing list