diff options
author | Chris Lattner <sabre@nondot.org> | 2004-02-27 06:27:07 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-02-27 06:27:07 +0000 |
commit | f7b0041fb5605828bede461cc58a1b17a356676d (patch) | |
tree | 47acfb6c15160ad70ea081f8efa1ae84ec6085da | |
parent | fc54e83cea9c8bdc924981576caac92da690dbe6 (diff) |
The instcombiner should canonicalize comparisons.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11899 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/Transforms/InstCombine/canonicalize_branch.ll | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/canonicalize_branch.ll b/test/Transforms/InstCombine/canonicalize_branch.ll new file mode 100644 index 0000000000..dbf3ab2058 --- /dev/null +++ b/test/Transforms/InstCombine/canonicalize_branch.ll @@ -0,0 +1,27 @@ +; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep 'setne\|setle\|setge' + +int %test1(uint %X, uint %Y) { + %C = setne uint %X, %Y + br bool %C, label %T, label %F +T: + ret int 12 +F: + ret int 123 +} + +int %test2(uint %X, uint %Y) { + %C = setle uint %X, %Y + br bool %C, label %T, label %F +T: + ret int 12 +F: + ret int 123 +} +int %test3(uint %X, uint %Y) { + %C = setge uint %X, %Y + br bool %C, label %T, label %F +T: + ret int 12 +F: + ret int 123 +} |