diff options
| author | Evan Cheng <evan.cheng@apple.com> | 2006-01-20 01:12:23 +0000 |
|---|---|---|
| committer | Evan Cheng <evan.cheng@apple.com> | 2006-01-20 01:12:23 +0000 |
| commit | 9a4ab9660f0bb52ca97e8edf841ed3b63acd99cf (patch) | |
| tree | 0795672d69529efbb35f70e30d123957a5c1b5a1 | |
| parent | e272b4ec173fa20540a069d745dfa605ce0b5e93 (diff) | |
| download | bcm5719-llvm-9a4ab9660f0bb52ca97e8edf841ed3b63acd99cf.tar.gz bcm5719-llvm-9a4ab9660f0bb52ca97e8edf841ed3b63acd99cf.zip | |
Added a load folding bug test case.
llvm-svn: 25472
| -rw-r--r-- | llvm/test/Regression/CodeGen/X86/2006-01-19-ISelFoldingBug.ll | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/test/Regression/CodeGen/X86/2006-01-19-ISelFoldingBug.ll b/llvm/test/Regression/CodeGen/X86/2006-01-19-ISelFoldingBug.ll new file mode 100644 index 00000000000..4dc9165434d --- /dev/null +++ b/llvm/test/Regression/CodeGen/X86/2006-01-19-ISelFoldingBug.ll @@ -0,0 +1,15 @@ +; RUN: llvm-as < %s | llc -march=x86 | grep 'shld' | wc -l | grep 1 +; +; Check that the isel does not fold the shld, which already folds a load +; and has two uses, into a store. +%A = external global uint + +uint %test5(uint %B, ubyte %C) { + %tmp.1 = load uint *%A; + %tmp.2 = shl uint %tmp.1, ubyte %C + %tmp.3 = sub ubyte 32, %C + %tmp.4 = shr uint %B, ubyte %tmp.3 + %tmp.5 = or uint %tmp.4, %tmp.2 + store uint %tmp.5, uint* %A + ret uint %tmp.5 +} |

