summaryrefslogtreecommitdiffstats
path: root/llvm/lib/System/Path.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-08-21 18:03:09 +0000
committerChris Lattner <sabre@nondot.org>2005-08-21 18:03:09 +0000
commit539c3fa8637734266f14178139936eb4576fcd46 (patch)
tree385de73f95927468884442506851a14b93a23433 /llvm/lib/System/Path.cpp
parent0500e362bf1be3aa626e9d4f5f8d8246770dbae0 (diff)
downloadbcm5719-llvm-539c3fa8637734266f14178139936eb4576fcd46.tar.gz
bcm5719-llvm-539c3fa8637734266f14178139936eb4576fcd46.zip
When legalizing brcond ->brcc or select -> selectcc, make sure to truncate
the old condition to a one bit value. The incoming value must have been promoted, and the top bits are undefined. This causes us to generate: _test: rlwinm r2, r3, 0, 31, 31 li r3, 17 cmpwi cr0, r2, 0 bne .LBB_test_2 ; .LBB_test_1: ; li r3, 1 .LBB_test_2: ; blr instead of: _test: rlwinm r2, r3, 0, 31, 31 li r2, 17 cmpwi cr0, r3, 0 bne .LBB_test_2 ; .LBB_test_1: ; li r2, 1 .LBB_test_2: ; or r3, r2, r2 blr for: int %test(bool %c) { %retval = select bool %c, int 17, int 1 ret int %retval } llvm-svn: 22947
Diffstat (limited to 'llvm/lib/System/Path.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud