diff --git a/test/Transforms/InstCombine/select.ll b/test/Transforms/InstCombine/select.ll new file mode 100644 index 00000000000..d635ffd8b5a --- /dev/null +++ b/test/Transforms/InstCombine/select.ll @@ -0,0 +1,18 @@ +; This test makes sure that these instructions are properly eliminated. +; + +; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep select + +implementation + +int %test1(int %A, int %B) { + %C = select bool false, int %A, int %B + ret int %C +} + +int %test2(int %A, int %B) { + %C = select bool true, int %A, int %B + ret int %C +} + +